Skip to content

Add typed repository source inputs and session metadata - #451

Open
Osvaldo Ortega (osortega) wants to merge 4 commits into
mainfrom
agents/repository-session-config
Open

Osvaldo Ortega (osortega) wants to merge 4 commits into
mainfrom
agents/repository-session-config

Conversation

@osortega

@osortega Osvaldo Ortega (osortega) commented Sep 16, 2026

Copy link
Copy Markdown

Summary

Make repository intent a first-class AHP contract, separate from provider configuration and resolved filesystem locations:

{
  "channel": "ahp-session:/new",
  "repositorySource": "https://example.org/team/project.git",
  "repositoryRevision": "main",
  "config": { "mode": "interactive" }
}
  • Add optional typed repositorySource: URI and repositoryRevision: string fields to CreateSessionParams, ResolveSessionConfigParams, and SessionConfigCompletionsParams.
  • Add the same immutable fields to SessionMetadata, inherited by SessionState and SessionSummary. Hosts preserve the requested intent from Creating through Ready/Failed, including reconnect and listing; resolved directories remain separate.
  • Discover support through AgentCapabilities.repositorySource: absent means unsupported, {} supports source-based creation, and { "revision": true } also supports an explicit revision.
  • Keep config for provider-specific settings. There are no repository config keys, property-name mappings, or repository descriptors in SessionConfigSchema.
  • Preserve explicit rejection of malformed or unsupported intent, credential-free inputs, authorization before preparation, directory-free config queries without side effects, host-owned preparation and cleanup, and exact source/revision verification after a lost creation reply.
  • Regenerate the six language clients, schemas and reference documentation. No new RPC, lifecycle state, repository catalogue, reusable repository binding, release, or protocol-version bump.

The source URI identifies what to prepare, not a checkout identity. One source may produce multiple directories or different worktrees across sessions. Source and nonempty workingDirectories are mutually exclusive on creation; config queries may include an existing workingDirectory as context.

Protocol revision for downstream synchronization: fa44ef3fae7c4750012024c106b70577e7a027c4.

Public client counterpart: microsoft/vscode#336361.

Validation of this typed-field revision

  • Required npm test: 460 tests passed, including typecheck, lint, release/changelog and schema checks, with 100% reducer coverage.
  • Repeated generation is deterministic.
  • TypeScript SDK request/state tests: 28 passed; TypeScript client source typecheck passed.
  • The 49 shared wire fixtures passed in TypeScript, Rust, Go, Swift, Kotlin and .NET. They cover typed repository metadata across lifecycle states, source-only and explicit-revision intent, multiple resolved directories, and capability discovery.
  • Rust ahp-types unit/corpus/doc tests and cargo check --locked --manifest-path clients/rust/Cargo.toml -p ahp --lib passed.
  • Go go test ./... passed. Swift TypesRoundTripFixtureTests and Kotlin RoundTripCorpusTest passed. The targeted .NET TypesRoundTripFixtures run passed 50 tests.
  • Dependency versions are unchanged. Temporary language tooling/caches were isolated; shared caches were not removed or modified to work around access restrictions.

Reading order

  1. Creation fields, config-query fields, session metadata, and agent capability.
  2. Repository-backed creation specification.
  3. Schema tests, SDK tests, and wire fixtures 046–049.

Limits

These are protocol, generated-client, wire and in-memory SDK checks, not live host/client interoperability evidence. Generated types do not enforce URI policy, authorization, lifecycle ordering or cleanup; concrete hosts and clients must enforce the contract. No application, daemon, UI or end-to-end scenario was launched for this revision.

Clients and hosts using the earlier unreleased config-based drafts need coordinated updates. Earlier manual testing, CI and independent reviews apply only to their original revisions; no new live rollout, released-binary compatibility or independent review is claimed here.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use optional repositorySource and repositoryRevision values in the existing session config flow. Remove the unreleased descriptor, key mapping, exports, and generator registrations while retaining host-owned preparation, lifecycle, and recovery semantics. Update generated mirrors, documentation, and shared wire and SDK coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 79731f48-d288-483f-8809-136aa141d1eb
@osortega Osvaldo Ortega (osortega) changed the title Add schema-discovered repository-backed session creation Standardize repository-backed session configuration keys Sep 17, 2026
Replace repeated configuration rules with links to the shared schema documentation and keep progress guidance operation-neutral. Retain the normative specification and the source/directory, readiness, and disposal safeguards.

Regenerate SDK comments and schema descriptions without changing declarations or wire structure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 79731f48-d288-483f-8809-136aa141d1eb
Move repository source and revision out of provider configuration into existing request types and immutable session metadata. Advertise source and revision support explicitly through agent capabilities and keep the preparation lifecycle unchanged.

Regenerate all SDKs and schemas, and cover typed requests, capability discovery, and recoverable state in shared wire fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 79731f48-d288-483f-8809-136aa141d1eb
@osortega Osvaldo Ortega (osortega) changed the title Standardize repository-backed session configuration keys Add typed repository source inputs and session metadata Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant