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
19 changes: 7 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1964,18 +1964,13 @@ replaced; do not carry obsolete compatibility code forward to satisfy this secti
identity; retries cannot replace it. Keep this query separate from runtime
observations and do not touch activity or wake sandboxes. The versioned contract
is `contracts/agents-api/execution-configuration.md`.
- Provider configuration support belongs to shared adapter-owned declarations in
`internal/harnessconfig`. One immutable declaration registry supplies public
provider validation, startup discovery and the optional safe provider descriptor
on native adapter registration. The separate engine catalog qualifies operations,
not a duplicate table of provider facts. Core owns credential environment and
endpoint admission policy, deployment enablement and safe HTTP projection. No parallel
HTTP harness table or readiness gate is permitted. The startup query includes
these declarations only with `include=configuration_capabilities`, preserving
its legacy default response for installed strict clients; the extension has an
independent schema version. Advertise build scope and unknown live availability,
not universal support across deployed Runtime versions. Operation-specific
admission remains authoritative; an extra registry declaration cannot enable it.
- Provider input validation uses the adapter-owned rules in `internal/harnessconfig`.
Keep one internal registry for protocol and token-limit validation; Core owns
credential environment and endpoint admission policy. These rules are not a
public discovery API or Runtime registration descriptor. Operation qualification
and live readiness retain their existing owners. The Core startup view keeps its
basic supported/configured deployment snapshot and accepts no query parameters.
Session frozen execution-configuration reads remain a separate Core extension.
- Public Agent updates use `POST /v1/agents/{agent_id}` with the same tenant/Beta
boundary and shared saved-field validation. Preserve omission separately from
null; only supplied fields replace saved values. Metadata is a separate whole-map
Expand Down
24 changes: 0 additions & 24 deletions apps/parsar-daemon/internal/agent/provider_configuration.go

This file was deleted.

84 changes: 0 additions & 84 deletions apps/parsar-daemon/internal/agent/provider_configuration_test.go

This file was deleted.

26 changes: 7 additions & 19 deletions apps/parsar-daemon/internal/agent/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"sync"

"github.com/MiniMax-AI-Dev/parsar/internal/agentdaemon/proto"
"github.com/MiniMax-AI-Dev/parsar/internal/harnessconfig"
"github.com/MiniMax-AI-Dev/parsar/internal/harnessconfig/builtin"
)

// Factory builds a Session for one prompt_request. out is the upstream
Expand Down Expand Up @@ -57,25 +55,17 @@ var ErrUnsupportedKind = errors.New("agent: unsupported agent_kind")
// Registry maps agent_kind → Factory and keeps the daemon-advertised
// capability descriptor for each kind. Safe for concurrent use.
type Registry struct {
mu sync.RWMutex
factories map[string]Factory
preparers map[string]PreparationFactory
kinds map[string]proto.SupportedAgentKind
configurations harnessconfig.Registry
mu sync.RWMutex
factories map[string]Factory
preparers map[string]PreparationFactory
kinds map[string]proto.SupportedAgentKind
}

func NewRegistry() *Registry {
return NewRegistryWithConfigurations(builtin.Registry())
}

// NewRegistryWithConfigurations shares an immutable adapter declaration snapshot
// with discovery and validation; factory registration still owns availability.
func NewRegistryWithConfigurations(configurations harnessconfig.Registry) *Registry {
return &Registry{
factories: make(map[string]Factory),
preparers: make(map[string]PreparationFactory),
kinds: make(map[string]proto.SupportedAgentKind),
configurations: configurations,
factories: make(map[string]Factory),
preparers: make(map[string]PreparationFactory),
kinds: make(map[string]proto.SupportedAgentKind),
}
}

Expand All @@ -102,7 +92,6 @@ func (r *Registry) RegisterKind(info proto.SupportedAgentKind, f Factory) {
delete(r.preparers, kind)
info.Capabilities.Preparation = false
info.Capabilities.WorkspaceReadPreparation = false
info.ProviderConfiguration = providerConfigurationDescriptor(r.configurations, kind)
r.kinds[kind] = info
}

Expand Down Expand Up @@ -140,7 +129,6 @@ func (r *Registry) SupportedAgentKinds() []proto.SupportedAgentKind {
if info.Kind == "" {
info = proto.SupportedAgentKind{Kind: kind, Available: true}
}
info.ProviderConfiguration = info.ProviderConfiguration.Clone()
out = append(out, info)
}
slices.SortFunc(out, func(a, b proto.SupportedAgentKind) int {
Expand Down
7 changes: 0 additions & 7 deletions apps/parsar-daemon/internal/cli/claude_sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ func TestClaudeSDKDiscoveryAndRegistration(t *testing.T) {
t.Fatal(info)
}
for _, registered := range reg.SupportedAgentKinds() {
if registered.Kind == "claude_sdk" {
configuration := registered.ProviderConfiguration
if configuration == nil || configuration.SchemaVersion != 1 || len(configuration.Providers) != 1 || configuration.Providers[0].Protocol != "anthropic" || configuration.Providers[0].RequiresTokenLimits {
t.Fatal("SDK registration lost its provider declaration")
}
registered.ProviderConfiguration = nil
}
if registered.Kind == "claude_sdk" && registered != info {
t.Fatalf("SDK descriptor changed: %+v", registered)
}
Expand Down
40 changes: 11 additions & 29 deletions contracts/agents-api/execution-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,17 @@ provenance. Missing, deleted and foreign-tenant Session IDs share the existing
not-found response. Responses are `Cache-Control: no-store`. Keys, ciphertext,
secret references, native headers, query parameters and permissions are excluded.

## Supported provider configuration
## Discovery boundary

`GET /v1/agents/core/startup-configuration?include=configuration_capabilities`
adds a `configuration_capabilities` field to the existing startup view. Without
that exact optional query, the legacy response shape is unchanged, including its
schema version. Duplicate, unknown or malformed startup queries are rejected.
The extension has its own `schema_version: 1`:
Provider configuration discovery is not exposed. The Core startup-configuration
extension retains its basic supported/configured deployment snapshot and accepts
no query parameters, including the retired `include=configuration_capabilities`.
Provider inputs are still validated against internal adapter-owned rules and Core
admission policy. Removing discovery does not change the supported inputs or
create/update/execute behavior.

- `scope: core_build_provider_configuration` identifies the limited subject.
- `runtime_availability: unknown` explicitly excludes live peer readiness.
- `admission` declares Core's hosted-only credential boundary, HTTPS endpoint
restrictions and nonnegative ordered token limits.
- `harnesses` is sorted by registered harness name. Each entry contains
`support` (`supported` or `unknown`), deployment `enabled` and `default` flags,
plus provider protocol declarations. An unknown declaration has no providers.
- Each provider lists `required_fields` and `positive_fields`. Codex declares
Responses; Claude SDK and MiniMax Code declare Anthropic. MiniMax Code also
requires positive `context_window` and `max_output_tokens`.

Adapter-owned declarations in `internal/harnessconfig` have one immutable registry
used by provider validation and discovery. Native adapter registration attaches
the same optional safe provider descriptor to the common Runtime contract. The
separate engine catalog still owns qualification of public operations. Core
composition adds deployment enablement and Core-owned admission restrictions, then projects
only public fields. It does not serialize native capability or operator objects.
Adding a declaration does not authorize a new public operation. Runtime versions
may differ; actual selection/admission still checks the chosen Runtime's features.
No node, binary, endpoint, model or key readiness is implied by support or enablement.

The endpoints do not mutate configuration, rotate keys, migrate Sessions, expose
a model catalog or accept arbitrary native options. See
This Session query and the startup view are Core extensions, not OpenAI Agents
API operations. Ordinary Agent and Session operations retain their pinned upstream
contracts. Neither query mutates configuration, rotates keys, migrates Sessions,
exposes a model catalog or accepts arbitrary native options. See
[model-execution.md](model-execution.md) for write and inheritance semantics.
Loading
Loading