Skip to content

Commit 9c554ac

Browse files
authored
Merge branch 'main' into add-approvals-to-functioninvokingchatclient
2 parents c118133 + 20349f8 commit 9c554ac

File tree

57 files changed

+1581
-398
lines changed

Some content is hidden

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

57 files changed

+1581
-398
lines changed

.config/CredScanSuppressions.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
{}
1+
{
2+
"tool": "Credential Scanner",
3+
"suppressions": [
4+
{
5+
"file": "\\test\\Libraries\\Microsoft.Extensions.Compliance.Redaction.Tests\\HmacRedactorTest.cs",
6+
"_justification": "Tests"
7+
}
8+
]
9+
}

azure-pipelines-unofficial.yml

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
trigger: none
2+
3+
pr: none
4+
5+
variables:
6+
- name: _TeamName
7+
value: dotnet-r9
8+
- name: NativeToolsOnMachine
9+
value: true
10+
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
11+
value: true
12+
13+
- name: SkipQualityGates
14+
value: false
15+
16+
- name: runAsPublic
17+
value: ${{ eq(variables['System.TeamProject'], 'public') }}
18+
19+
- name: _BuildConfig
20+
value: Release
21+
- name: isOfficialBuild
22+
value: ${{ and(ne(variables['runAsPublic'], 'true'), notin(variables['Build.Reason'], 'PullRequest')) }}
23+
- name: Build.Arcade.ArtifactsPath
24+
value: $(Build.SourcesDirectory)/artifacts/
25+
- name: Build.Arcade.LogsPath
26+
value: $(Build.Arcade.ArtifactsPath)log/$(_BuildConfig)/
27+
- name: Build.Arcade.TestResultsPath
28+
value: $(Build.Arcade.ArtifactsPath)TestResults/$(_BuildConfig)/
29+
- name: Build.Arcade.VSIXOutputPath
30+
value: $(Build.Arcade.ArtifactsPath)VSIX
31+
32+
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/validation/'), eq(variables['Build.Reason'], 'Manual')) }}:
33+
- name: PostBuildSign
34+
value: false
35+
- ${{ else }}:
36+
- name: PostBuildSign
37+
value: true
38+
39+
- name: _PublishArgs
40+
value: >-
41+
/p:DotNetPublishUsingPipelines=true
42+
- name: _OfficialBuildIdArgs
43+
value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
44+
# needed for signing
45+
- name: _SignType
46+
value: test
47+
- name: _SignArgs
48+
value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:Sign=$(_Sign) /p:DotNetPublishUsingPipelines=true
49+
- name: _Sign
50+
value: true
51+
52+
- name: enableSourceIndex
53+
value: false
54+
55+
resources:
56+
repositories:
57+
- repository: 1ESPipelineTemplates
58+
type: git
59+
name: 1ESPipelineTemplates/1ESPipelineTemplates
60+
ref: refs/tags/release
61+
62+
extends:
63+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
64+
parameters:
65+
sdl:
66+
sourceAnalysisPool:
67+
name: NetCore1ESPool-Internal
68+
image: windows.vs2022preview.amd64
69+
os: windows
70+
customBuildTags:
71+
- ES365AIMigrationTooling
72+
73+
stages:
74+
- stage: build
75+
displayName: Build
76+
variables:
77+
- template: /eng/common/templates-official/variables/pool-providers.yml@self
78+
jobs:
79+
- template: /eng/common/templates-official/jobs/jobs.yml@self
80+
parameters:
81+
enableMicrobuild: true
82+
enableTelemetry: true
83+
enableSourceIndex: ${{ variables['enableSourceIndex'] }}
84+
runAsPublic: ${{ variables['runAsPublic'] }}
85+
# Publish build logs
86+
enablePublishBuildArtifacts: false
87+
# Publish test logs
88+
enablePublishTestResults: true
89+
# Publish NuGet packages using v3
90+
# https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3
91+
enablePublishUsingPipelines: false
92+
enablePublishBuildAssets: false
93+
workspace:
94+
clean: all
95+
96+
jobs:
97+
98+
# ----------------------------------------------------------------
99+
# This job build and run tests on Windows
100+
# ----------------------------------------------------------------
101+
- job: Windows
102+
timeoutInMinutes: 180
103+
testResultsFormat: VSTest
104+
pool:
105+
name: NetCore1ESPool-Internal
106+
image: windows.vs2022preview.amd64
107+
os: windows
108+
109+
variables:
110+
- _buildScript: $(Build.SourcesDirectory)/build.cmd -ci -NativeToolsOnMachine
111+
112+
templateContext:
113+
outputs:
114+
- output: pipelineArtifact
115+
displayName: 'Publish Azure DevOps extension artifacts'
116+
condition: succeeded()
117+
targetPath: '$(Build.Arcade.VSIXOutputPath)'
118+
artifactName: 'VSIXArtifacts'
119+
120+
preSteps:
121+
- checkout: self
122+
clean: true
123+
persistCredentials: true
124+
fetchDepth: 1
125+
126+
steps:
127+
- template: /eng/pipelines/templates/BuildAndTest.yml
128+
parameters:
129+
buildScript: $(_buildScript)
130+
buildConfig: $(_BuildConfig)
131+
repoLogPath: $(Build.Arcade.LogsPath)
132+
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
133+
skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }}
134+
isWindows: true
135+
warnAsError: 0
136+
137+
# ----------------------------------------------------------------
138+
# This job build and run tests on Ubuntu
139+
# ----------------------------------------------------------------
140+
- job: Ubuntu
141+
timeoutInMinutes: 180
142+
testResultsFormat: VSTest
143+
pool:
144+
name: NetCore1ESPool-Internal
145+
image: 1es-mariner-2
146+
os: linux
147+
148+
variables:
149+
- _buildScript: $(Build.SourcesDirectory)/build.sh --ci
150+
151+
preSteps:
152+
- checkout: self
153+
clean: true
154+
persistCredentials: true
155+
fetchDepth: 1
156+
157+
steps:
158+
- template: /eng/pipelines/templates/BuildAndTest.yml
159+
parameters:
160+
buildScript: $(_buildScript)
161+
buildConfig: $(_BuildConfig)
162+
repoLogPath: $(Build.Arcade.LogsPath)
163+
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
164+
skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }}
165+
isWindows: false
166+
warnAsError: 0
167+
168+
# ----------------------------------------------------------------
169+
# This stage performs quality gates enforcements
170+
# ----------------------------------------------------------------
171+
- stage: codecoverage
172+
displayName: CodeCoverage
173+
dependsOn:
174+
- build
175+
condition: and(succeeded('build'), ne(variables['SkipQualityGates'], 'true'))
176+
variables:
177+
- template: /eng/common/templates-official/variables/pool-providers.yml@self
178+
jobs:
179+
- template: /eng/common/templates-official/jobs/jobs.yml@self
180+
parameters:
181+
enableMicrobuild: true
182+
enableTelemetry: true
183+
runAsPublic: ${{ variables['runAsPublic'] }}
184+
workspace:
185+
clean: all
186+
187+
# ----------------------------------------------------------------
188+
# This stage downloads the code coverage reports from the build jobs,
189+
# merges those and validates the combined test coverage.
190+
# ----------------------------------------------------------------
191+
jobs:
192+
- job: CodeCoverageReport
193+
timeoutInMinutes: 180
194+
195+
pool:
196+
name: NetCore1ESPool-Internal
197+
image: 1es-mariner-2
198+
os: linux
199+
200+
preSteps:
201+
- checkout: self
202+
clean: true
203+
persistCredentials: true
204+
fetchDepth: 1
205+
206+
steps:
207+
- script: $(Build.SourcesDirectory)/build.sh --ci --restore
208+
displayName: Init toolset
209+
210+
- template: /eng/pipelines/templates/VerifyCoverageReport.yml
211+
212+
213+
# ----------------------------------------------------------------
214+
# This stage only performs a build treating warnings as errors
215+
# to detect any kind of code style violations
216+
# ----------------------------------------------------------------
217+
- stage: correctness
218+
displayName: Correctness
219+
dependsOn: []
220+
variables:
221+
- template: /eng/common/templates-official/variables/pool-providers.yml@self
222+
jobs:
223+
- template: /eng/common/templates-official/jobs/jobs.yml@self
224+
parameters:
225+
enableMicrobuild: true
226+
enableTelemetry: true
227+
runAsPublic: ${{ variables['runAsPublic'] }}
228+
workspace:
229+
clean: all
230+
231+
jobs:
232+
- job: WarningsCheck
233+
timeoutInMinutes: 180
234+
235+
pool:
236+
name: NetCore1ESPool-Internal
237+
image: 1es-mariner-2
238+
os: linux
239+
240+
variables:
241+
- _buildScript: $(Build.SourcesDirectory)/build.sh --ci
242+
243+
preSteps:
244+
- checkout: self
245+
clean: true
246+
persistCredentials: true
247+
fetchDepth: 1
248+
249+
steps:
250+
- template: '\eng\pipelines\templates\BuildAndTest.yml'
251+
parameters:
252+
buildScript: $(_buildScript)
253+
buildConfig: $(_BuildConfig)
254+
repoLogPath: $(Build.Arcade.LogsPath)
255+
repoTestResultsPath: $(Build.Arcade.TestResultsPath)
256+
skipTests: true
257+
skipQualityGates: true
258+
isWindows: false

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,17 +194,17 @@
194194
</Dependency>
195195
</ProductDependencies>
196196
<ToolsetDependencies>
197-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25415.3">
197+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25428.3">
198198
<Uri>https://github.com/dotnet/arcade</Uri>
199-
<Sha>d87d66c43d0660e5c8e84e667c5c8a8140bce888</Sha>
199+
<Sha>5fe939db0a156be6f10e17c105b1842c0c8c8bdc</Sha>
200200
</Dependency>
201-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.25415.3">
201+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.25428.3">
202202
<Uri>https://github.com/dotnet/arcade</Uri>
203-
<Sha>d87d66c43d0660e5c8e84e667c5c8a8140bce888</Sha>
203+
<Sha>5fe939db0a156be6f10e17c105b1842c0c8c8bdc</Sha>
204204
</Dependency>
205-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.25415.3">
205+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.25428.3">
206206
<Uri>https://github.com/dotnet/arcade</Uri>
207-
<Sha>d87d66c43d0660e5c8e84e667c5c8a8140bce888</Sha>
207+
<Sha>5fe939db0a156be6f10e17c105b1842c0c8c8bdc</Sha>
208208
</Dependency>
209209
</ToolsetDependencies>
210210
</Dependencies>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<!-- Dependencies from https://github.com/dotnet/efcore -->
8484
<MicrosoftEntityFrameworkCoreSqliteVersion>9.0.8</MicrosoftEntityFrameworkCoreSqliteVersion>
8585
<!-- Dependencies from https://github.com/dotnet/arcade -->
86-
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.25415.3</MicrosoftDotNetBuildTasksTemplatingVersion>
86+
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.25428.3</MicrosoftDotNetBuildTasksTemplatingVersion>
8787
</PropertyGroup>
8888
<PropertyGroup Label="No longer automated Maestro dependency updates">
8989
<!-- Packages from dotnet/runtime -->

eng/common/core-templates/job/source-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ parameters:
3333
# container and pool.
3434
platform: {}
3535

36+
# Optional list of directories to ignore for component governance scans.
37+
componentGovernanceIgnoreDirectories: []
38+
3639
is1ESPipeline: ''
3740

3841
# If set to true and running on a non-public project,
@@ -93,3 +96,4 @@ jobs:
9396
parameters:
9497
is1ESPipeline: ${{ parameters.is1ESPipeline }}
9598
platform: ${{ parameters.platform }}
99+
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

eng/common/core-templates/jobs/source-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ parameters:
2121
# one job runs on 'defaultManagedPlatform'.
2222
platforms: []
2323

24+
# Optional list of directories to ignore for component governance scans.
25+
componentGovernanceIgnoreDirectories: []
26+
2427
is1ESPipeline: ''
2528

2629
# If set to true and running on a non-public project,
@@ -47,6 +50,7 @@ jobs:
4750
is1ESPipeline: ${{ parameters.is1ESPipeline }}
4851
jobNamePrefix: ${{ parameters.jobNamePrefix }}
4952
platform: ${{ platform }}
53+
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
5054
enableInternalSources: ${{ parameters.enableInternalSources }}
5155

5256
- ${{ if eq(length(parameters.platforms), 0) }}:
@@ -55,4 +59,5 @@ jobs:
5559
is1ESPipeline: ${{ parameters.is1ESPipeline }}
5660
jobNamePrefix: ${{ parameters.jobNamePrefix }}
5761
platform: ${{ parameters.defaultManagedPlatform }}
62+
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
5863
enableInternalSources: ${{ parameters.enableInternalSources }}

eng/common/core-templates/steps/source-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ parameters:
1111
# for details. The entire object is described in the 'job' template for simplicity, even though
1212
# the usage of the properties on this object is split between the 'job' and 'steps' templates.
1313
platform: {}
14+
15+
# Optional list of directories to ignore for component governance scans.
16+
componentGovernanceIgnoreDirectories: []
17+
1418
is1ESPipeline: false
1519

1620
steps:
@@ -126,5 +130,8 @@ steps:
126130
parameters:
127131
displayName: Component Detection (Exclude upstream cache)
128132
is1ESPipeline: ${{ parameters.is1ESPipeline }}
129-
componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache'
133+
${{ if eq(length(parameters.componentGovernanceIgnoreDirectories), 0) }}:
134+
componentGovernanceIgnoreDirectories: '$(System.DefaultWorkingDirectory)/artifacts/sb/src/artifacts/obj/source-built-upstream-cache'
135+
${{ else }}:
136+
componentGovernanceIgnoreDirectories: ${{ join(',', parameters.componentGovernanceIgnoreDirectories) }}
130137
disableComponentGovernance: ${{ eq(variables['System.TeamProject'], 'public') }}

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"msbuild-sdks": {
1919
"Microsoft.Build.NoTargets": "3.7.0",
2020
"Microsoft.Build.Traversal": "3.2.0",
21-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25415.3",
22-
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25415.3"
21+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25428.3",
22+
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25428.3"
2323
}
2424
}

src/Libraries/Microsoft.Extensions.AI.Abstractions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## NOT YET RELEASED
4+
5+
- Added non-invocable `AIFunctionDeclaration` (base class for `AIFunction`), `AIFunctionFactory.CreateDeclaration`, and `AIFunction.AsDeclarationOnly`.
6+
37
## 9.8.0
48

59
- Added `AIAnnotation` and related types to represent citations and other annotations in chat messages.

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatToolMode.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ private protected ChatToolMode()
5555

5656
/// <summary>
5757
/// Instantiates a <see cref="ChatToolMode"/> indicating that tool usage is required,
58-
/// and that the specified <see cref="AIFunction"/> must be selected. The function name
59-
/// must match an entry in <see cref="ChatOptions.Tools"/>.
58+
/// and that the specified function name must be selected.
6059
/// </summary>
6160
/// <param name="functionName">The name of the required function.</param>
6261
/// <returns>An instance of <see cref="RequiredChatToolMode"/> for the specified function name.</returns>

0 commit comments

Comments
 (0)