Download the PHP package philippelyp/llmuid without Composer

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

LLMUID for PHP

Identifiers that resist hallucination, survive repeated LLM copying, and repair themselves when damaged — or fail honestly when they can't.

The reference implementation of LLMUID, an identifier scheme for systems where identifiers must pass through large language models — read, copied and re-emitted across many prompt hops.

Ten symbols over a 29-symbol alphabet of digits and consonants, eight of them a random payload and two of them check symbols, written as five groups of two. No vowels, so an identifier can never spell a word. No lookalikes, so it can never be misread across ambiguous glyphs.

Install

Requires PHP 8.2 or later.

Use

Reading is liberal. Case, delimiters and wrapping carry no information, and any single damage event is repaired silently:

Anything further away is a hard failure, never a guess:

Context binding

Check symbols can be bound to the slot, role or parent an identifier belongs to, so a genuine identifier pasted into the wrong place fails to resolve. The same context string must be given to mint() and to resolve().

This is the defence against the most dangerous failure of all — a well-formed identifier in the wrong role, which nothing about the string itself can catch.

Persisting the registry

The registry is in-memory and append-only: it lives in the object and dies with it. registry() hands the issued set back so a caller can persist it, and the constructor takes that same array back.

API

There are no exceptions. Failure returns FALSE and explains itself through last_error(). The one call that can throw — the system random source — is caught and converted into a failed mint like any other.

The wording of last_error() separates the two things worth watching: a repair means the channel is degrading, while a failure means the pipeline is faulty, since honest noise almost never produces multi-event damage.

Conformance

src/vectors/ is a copy of the conformance vectors from the specification repository: 134 cases pinning the context digest, liberal reading, the bounded distance and the damage contract end to end. self_test() grades this class against every one of them, and then against the invariants minting is answerable for — which are random by design, so no fixed case can pin them.

It reads the vectors from the installed package, mints only into throwaway objects, and leaves the registry of the object it is called on untouched.

The vectors are frozen and they are the answer key. A failure means this implementation has drifted from the specification — never that a vector needs updating.

resolve() is not an extractor

Normalization is deliberately liberal, which means it will happily eat the prose around an identifier as well:

Extract identifiers from surrounding text yourself — they match /\b[0-9BCDFGHJKMNPQRSTVWXZ]{2}(?:-[0-9BCDFGHJKMNPQRSTVWXZ]{2}){4}\b/ in canonical rendering — and hand resolve() one candidate at a time.

Not a security mechanism

The random payload makes identifiers statistically unguessable, but not cryptographically so, and the check symbols are public arithmetic anyone can compute. Identifiers must never be used as secrets, capabilities or bearer tokens, and possession of a valid identifier must never grant authority. The adversary in this design is a hallucinating model, not an attacker.

Development

There is nothing to install — no dependencies, dev or otherwise, and one self-contained class. There are two checks, and the class carries the second one itself rather than the tree carrying a test framework to run it:

The specification wins

llmuid.md is the design document and is authoritative; this code implements it without variation. If the two disagree, this code is wrong.

License

MIT — see LICENSE.


All versions of llmuid with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
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 philippelyp/llmuid contains the following files

Loading the files please wait ...