Download the PHP package tmonier/sylius-b2b-sales-copilot-plugin without Composer

On this page you can find all versions of the php package tmonier/sylius-b2b-sales-copilot-plugin. 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-b2b-sales-copilot-plugin

Sylius B2B Sales Copilot Plugin

English | Français

Conversational purchasing assistant skeleton for Sylius 2 B2B: a widget in the customer account sends requests to a copilot model behind a port (CopilotModelInterface). This version ships the replay adapter only: answers come from pre-recorded cassettes, with no call to an LLM API.

Demo: https://sylius-b2b.thibaut-monier.fr
Author: Thibaut Monier

Features

Natural-language actions on the store (reorder, quick add, quotes) through MCP tools are planned for a later version.

Requirements

Installation

Enable the bundle in config/bundles.php:

Import the routes in config/routes/tmonier_sylius_b2b_sales_copilot.yaml:

Register the widget controller in your shop assets entrypoint:

Configuration

List the channels where the copilot is available (B2B channels):

Recorded answers live in config/cassettes.jsonl (JSONL, one recorded request per line).

Audit logs are written to var/log/copilot_audit.log.

LLM integration (optional)

The plugin can call a real LLM via Symfony AI Platform. When the LLM is unavailable, the plugin falls back to replay mode transparently.

Set your API key via environment variable as documented by Symfony AI.

When ai.enabled is false (default), only the replay adapter is used — no LLM dependency is needed.

Supported Symfony AI version and path to 1.0

The plugin is tested against symfony/ai-platform ^0.15 (a single minor at a time: Symfony AI is pre-1.0 and every minor may break its API, so the constraint is never a range mixing incompatible APIs).

All Symfony AI code lives in one file, src/Infrastructure/SymfonyAi/SymfonyAiCopilotAdapter.php; the rest of the plugin only knows the CopilotModelInterface port. An architecture test (tests/Unit/Architecture/SymfonyAiConfinementTest.php) fails if a Symfony\AI\* class is referenced anywhere else. To move to 1.0, bump the constraint and adapt that adapter: tests/Unit/Infrastructure/SymfonyAi/SymfonyAiCopilotAdapterContractTest.php tells exactly what breaks.

Example cassette

Usage

A signed-in customer on an enabled channel sees the copilot widget on the account dashboard and can send a request. A recorded request (for example « état de mon panier ») returns its recorded answer.

The widget is hooked into sylius_shop.account.dashboard.index.content.main.section. A theme that replaces the dashboard can include it directly: {% include '@TmonierSyliusB2bSalesCopilotPlugin/account/copilot_widget.html.twig' %} (it renders nothing outside the enabled channels).

Screenshots

Development

Running tests

Code quality

License

MIT. See LICENSE file.

Author

Thibaut Monier
LinkedIn: https://www.linkedin.com/in/thibautmonier/

Contributing

Contributions are welcome. Please open an issue or pull request on GitHub.


All versions of sylius-b2b-sales-copilot-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
sylius/sylius Version ^2.2.9 || ^2.3
symfony/clock Version ^6.4 || ^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 tmonier/sylius-b2b-sales-copilot-plugin contains the following files

Loading the files please wait ...