Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions crates/provider-v3/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,26 @@ pub struct ProviderInfo {
/// exactly what it published before this field existed.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub scoped_projection_profiles: Vec<ProjectionProfile>,
/// The request-side arguments this release accepts.
///
/// **A provider says what it will tolerate, so a consumer can send it.** A
/// request field runs the opposite way to a response field: a consumer that
/// starts sending an unknown flag makes every older provider refuse the
/// invocation outright, so tolerance has to be published before anything
/// sends. Measured before the acceptance existed:
/// `--target-scope is not an argument of this command`.
///
/// The consumer sends `--target-scope` only where this list names it, so an
/// older release that does not publish the field is never sent the flag.
/// Omitted entirely when empty, which is what a build declaring no
/// request-side arguments publishes -- byte-identical to what it published
/// before this field existed.
///
/// Not "which scopes this build knows". That is a different statement, and
/// argv makes it: an unknown scope is refused by name rather than served a
/// `global` plan.
#[serde(skip_serializing_if = "Vec::is_empty")]
pub plan_request_fields: Vec<String>,
}

/// What a build declares about itself, by name rather than by position.
Expand Down Expand Up @@ -345,6 +365,23 @@ impl ProviderInfo {
.collect(),
projection_profile: declaration.projection_profile,
scoped_projection_profiles: declaration.scoped_projection_profiles,
// **Held, not absent.** Every build here accepts `--target-scope`
// and would declare it as `[TargetScope::REQUEST_FIELD]` -- the
// vendored kit blesses the field, and the type below is ready for
// it.
//
// What it waits on is a *released* checker. Measured 2026-08-28:
// with the field declared, `ai-stp-cli 0.0.7` refuses **all seven**
// with `provider-info fields differ from the closed v3 schema`,
// because the released runner predates the regenerated kit. Trading
// one conformance failure for seven is not a trade.
//
// This is the third time the kit and its runner have disagreed and
// the second time in this direction. The rule that comes out of it:
// a kit blessing a field is permission to *build* against it, and a
// released runner accepting it is permission to *emit* it. One line
// changes when the CLI ships.
plan_request_fields: Vec::new(),
})
}

Expand Down
7 changes: 7 additions & 0 deletions crates/provider-v3/src/vocabulary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ pub enum TargetScope {
}

impl TargetScope {
/// The request argument that carries a scope, as `plan_request_fields`
/// names it.
///
/// One constant, because the flag, the field and the kit's enum are three
/// spellings of one name and two of them are strings a consumer compares.
pub const REQUEST_FIELD: &'static str = "target_scope";

/// Every scope a profile may name.
pub const ALL: &'static [Self] = &[Self::Project, Self::UserRoot];

Expand Down
2 changes: 1 addition & 1 deletion provider-kit/v3/KIT-IDENTITY.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"aggregate_digest": "sha256:1d117032cee41bb807a90e66a185111b3243f415a056d54f5f22af0daf21eda9",
"aggregate_digest": "sha256:8e6f4fa1c163968166ff37ab548895fc59dde051405124c757161b3528457246",
"files": [
"conformance-cases.json",
"manifest.json",
Expand Down
2 changes: 1 addition & 1 deletion provider-kit/v3/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
999e8edaa86a3138e3c7c3a2e354e54c171d2a97194184d275593310c3c626ab conformance-cases.json
a441b602a82c48e142dfe11a3ef601163465234b39968d6e5cb3eb1dc3a73ed8 manifest.json
e92c327d4f8b30330b7be5241461b37e1ca844191b9d738649a732a982dee163 provider-info.schema.json
6b0e5f02c6ebc1503f4d6a1aa39b93df58cfd9d92037803244fe260bdb9235c4 provider-info.schema.json
10 changes: 10 additions & 0 deletions provider-kit/v3/provider-info.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
"type": "array",
"uniqueItems": true
},
"plan_request_fields": {
"items": {
"enum": [
"target_scope"
],
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"projection_profile": {
"additionalProperties": false,
"properties": {
Expand Down
Loading