Download the PHP package koh/sylius-agent-contracts without Composer

On this page you can find all versions of the php package koh/sylius-agent-contracts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sylius-agent-contracts

koh/sylius-agent-contracts

Shared contracts for the koh Sylius agent-readiness bundles.

This package serves no endpoint. It exists so that the granular one-package-per-protocol split stays composable: /.well-known/api-catalog, /.well-known/agent-skills/index.json, the A2A agent card, llms.txt, auth.md and the Link: response headers all need to know what the other, independently installable bundles offer — and none of them may depend on each other to find out.

Install

Configure

What you get

AgentContext

Resolved once per request, passed through every provider. Sylius has N channels where a CMS has one site, so every discovery document is channel- and locale-dependent.

AgentContext::cacheKey() is the only sanctioned way to build a cache key in this package family. Skipping it is the classic multi-channel bug: one channel warms the cache and every other channel is served its documents.

Depend on AgentContextFactoryInterface, not the concrete class — the implementation reaches into Sylius' channel and locale contexts, which a unit test of your listener has no business booting.

The factory resolves the channel in three stages — Sylius' channel context, then a hostname lookup, then the first enabled channel. The fallback matters: ChannelContextInterface throws when no channel matches the host, which is exactly what a bot arriving over the bare IP, a preview hostname or a misconfigured proxy produces. Unhandled, that turns every /.well-known/* request into a 500 — the most common reason an agent-readiness scan fails on a multi-channel shop.

Provider interfaces

Implement one (or several) and it is picked up automatically — registerForAutoconfiguration() is registered container-wide, so this works for services in your own App\ namespace with no wiring at all.

Interface DI tag Consumed by
AgentEndpointProviderInterface koh_agent.endpoint llms.txt, api-catalog
ApiCatalogEntryProviderInterface koh_agent.api_catalog_entry api-catalog, Link: headers
AgentSkillProviderInterface koh_agent.skill A2A card, agent-skills index, MCP
LlmsTxtSectionProviderInterface koh_agent.llms_txt_section llms.txt, llms-full.txt
MarkdownRepresentationProviderInterface koh_agent.markdown Accept: text/markdown
AuthMethodDescriptorInterface koh_agent.auth_method auth.md, agent_auth metadata
PayableOperationProviderInterface koh_agent.payable_operation MPP x-payment-info, x402
ResponseHeaderContributorInterface koh_agent.response_header the shared response listener
PaymentBypassVoterInterface koh_agent.payment_bypass x402

Example — adding your own section to llms.txt:

AgentJsonResponder

One consistent response shape for every discovery document: public, max-age=3600, stale-while-revalidate=86400, an ETag (returning crawlers send If-None-Match, and a 304 is far cheaper than a rebuild), X-Content-Type-Options: nosniff and Access-Control-Allow-Origin: * — in-browser agents read these cross-origin.

AgentResponseHeaderListener

The single kernel.response listener for the whole family. Link, Content-Signal, Vary and CORS all land on the same response; with one listener per bundle they overwrite each other depending on registration order. The merge rules are enforced here:

Deployment note

.well-known paths fall inside Sylius' shop firewall, which is stateful (context: shop, remember_me). Without an exemption every bot hit starts a session and the responses become uncacheable. Add a dedicated entry above the Sylius firewalls — access_control is not enough, it is evaluated only after the firewall has already matched:

Decommission

Removing the package is safe once no sibling bundle is installed: drop the composer require, the entry in config/bundles.php, config/packages/koh_agent.yaml and the koh_agent_public firewall. It owns no database table, no route and no cache pool of its own.

Security

Report vulnerabilities privately — see SECURITY.md. Advisories are published as CSAF 2.0 at https://ole-hartwig.eu/.well-known/csaf/.

The family threat model, covering this package, is at https://github.com/ohartwig/sylius-agent-ready/blob/main/docs/threat-model.md.

Licence

MIT — see LICENSE.


All versions of sylius-agent-contracts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5.11
sylius/sylius Version ^2.2.9 || ^2.3.0
symfony/config Version ^7.4 || ^8.0
symfony/console Version ^7.4 || ^8.0
symfony/dependency-injection Version ^7.4 || ^8.0
symfony/event-dispatcher Version ^7.4 || ^8.0
symfony/http-foundation Version ^7.4 || ^8.0
symfony/http-kernel Version ^7.4 || ^8.0
symfony/routing Version ^7.4 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package koh/sylius-agent-contracts contains the following files

Loading the files please wait ...