Download the PHP package fluffydiscord/honkers-sdk without Composer

On this page you can find all versions of the php package fluffydiscord/honkers-sdk. 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 honkers-sdk

honkers.dev SDK

Framework-agnostic PHP for the honkers.dev chatbot. Serve the tool/source endpoints the chatbot calls, push catalog changes back to the backend, and render the chat widget — no framework required.

Used by:

Examples

A tool — one class, one arguments DTO:

Argument DTOs carry symfony/validator constraints; ArgumentsSchemaGenerator turns them into a JSON Schema (with runtime-loaded choice enums):

Registries wrap a plain iterable of tools/sources and key them by getDefinition()->name:

Names must be unique — on a duplicate, get() returns the first match. The Symfony bundle fails the container build on a duplicate; standalone, keep them distinct yourself.

Also here: ChatbotDataSourceInterface (bulk documents), ToolChoiceLoaderInterface + #[ToolChoice] (DB-backed enums), the ChatbotLocaleContextInterface port the host app implements, result DTOs (ToolResult, ToolDefinition, SourceDocument, …) and helpers (CursorCodec, LocaleMatcher, HtmlToText).

Standalone setup (no framework)

The SDK owns the logic, not the transport. You wire the registries once, then map four HTTP routes to them.

Wire the pieces — each registry takes a plain list of services, no container:

GET /chatbot/v1/tools — tool list with input schemas:

POST /chatbot/v1/tools/{name} — body { "arguments": {...}, "context": {...} }:

GET /chatbot/v1/sources and GET /chatbot/v1/sources/{name}:

You provide, around the SDK: auth, routing, and argument deserialization. Locale matching against a channel's served locales is optional — use LocaleMatcher and implement ChatbotLocaleContextInterface if you have channels.

HTTP contract (what the chatbot backend expects)

The paths are fixed: the backend calls /chatbot/v1/... on your host. Serve the endpoints at exactly these paths — only the origin (scheme + host) is yours to configure on the backend.

Method Path Request Response
GET /chatbot/v1/tools Accept-Language (optional) { "tools": [ {name, description, inputSchema, ui?} ] }
POST /chatbot/v1/tools/{name} { "arguments": {...}, "context": { "conversationId", "locale", "channelCode"? } } { "content": [{type,text}], "blocks": [], "isError": bool }
GET /chatbot/v1/sources — { "sources": [ {name, description, locales} ] }
GET /chatbot/v1/sources/{name} ?locale=&channel=&cursor=&ids[]= (ids[] max 500; then cursor ignored, nextCursor null) { "documents": [...], "nextCursor": string\|null }

Outbound: push catalog changes

Tell the backend which catalog entries changed so it re-indexes them. This is the only call your server makes to honkers.dev — POST {backend}/api/v1/catalog/changes, auth Bearer {siteKey}.{ingestSecret}.

The client speaks PSR-18, so plug in any HTTP client (Guzzle, Symfony's Psr18Client, …) and PSR-17 factories:

Widget embed

Render the chat widget markup for any page:

Emits a deferred loader <script> and the <ai-chat-widget> element; all attribute values are escaped.

Tests


All versions of honkers-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-intl Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
symfony/intl Version ^6.4 || ^7.0 || ^8.0
symfony/validator Version ^6.4 || ^7.0 || ^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 fluffydiscord/honkers-sdk contains the following files

Loading the files please wait ...