Download the PHP package empire2/gaze-ghostwriter without Composer

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

gaze-ghostwriter

AI-assisted support ghostwriter for Laravel — dual inbound (IMAP mail + drop-in web feedback form), RAG-augmented draft generation, and PII-safe LLM calls through empiretwo/gaze-laravel.

CI Latest Version

gaze-ghostwriter ingests support requests from two channels — an IMAP inbox and a drop-in Livewire web feedback form — generates structured draft replies through the Laravel AI agent contract, and persists every prompt + response so you can review, edit, send (SMTP), or escalate to GitHub. Every outbound LLM call goes through a single boundary (GuardedAgentRunner) that runs gaze clean / gaze restore around the model invocation — placeholder tokens never leak into stored fields.

Requirements

Install

Composer will pull empiretwo/gaze-laravel automatically; the gaze CLI binary is downloaded into vendor/bin/gaze by its bundled installer plugin (Composer asks you to trust the plugin once).

Optional publishes:

Configuration

Edit config/gaze-ghostwriter.php. The most important keys:

Environment variables (subset):

Variable Purpose
GHOSTWRITER_ENABLED Master switch
GHOSTWRITER_GAZE_ENABLED Turn on the Gaze PII boundary
GHOSTWRITER_LOCALE Fallback language (de default)
GHOSTWRITER_SUPPORT_ADDRESSES Comma-separated [email protected],[email protected]
GHOSTWRITER_IMAP_HOST / _PORT / _USERNAME / _PASSWORD Webklex IMAP credentials
GHOSTWRITER_IMAP_FOLDER / _EXTRA_FOLDERS Inbox + extra folders to sync (e.g. Sent)
GHOSTWRITER_IMAP_LOOKBACK_DAYS / _FETCH_LIMIT Sync window
GHOSTWRITER_IMAP_ONLY_CONVERSATION_WITH_EMAIL Filter to a single counterparty
GHOSTWRITER_OPENAI_CHAT_MODEL Default gpt-4o-mini
OPENAI_ADMIN_KEY / OPENAI_MONTHLY_BUDGET Optional cost reporting in the admin UI
GITHUB_REPO / GITHUB_TOKEN / GHOSTWRITER_GITHUB_LABELS GitHub issue export
GHOSTWRITER_SMTP_HOST / _PORT / _USERNAME / _PASSWORD / _DRIVER Outbound SMTP for replies
GHOSTWRITER_REPLY_FROM_ADDRESS / _FROM_NAME From address

Host integration

User model

Add the bundled trait so the package can resolve the user's signing name and reply signatures:

The trait declares ghostwriterUserData(): HasOne against the package's GhostwriterUserData model. The relation name is fixed because the package calls it directly.

Authorization

The package routes default to ['web', 'auth']. Lock them down with role middleware (e.g. Spatie Permission):

Layout override

Replace the layout used by the bundled Livewire admin pages:

Toast UI

The Livewire components dispatch a toast event with type, message, heading, and duration. You can either:

  1. Use the bundled minimal toast component — drop <livewire:gaze-ghostwriter.toast /> into your layout. Tailwind utility classes only.
  2. Replace it with your own listener (e.g. Flux UI, Filament). The dispatched event is fully data — the package never imports a host-specific class.

Customer / ticket integration

The bundled partials/draft-smart-actions.blade.php view contains optional links into a customer detail page and a ticket system. Both are guarded by config:

If the configured route name is not registered or the model class does not exist, the link falls back to # and the ticket section stays empty — the package never crashes when these are absent.

Web feedback channel

In addition to the IMAP/SMTP support inbox, the package ships a drop-in Livewire form so that logged-in users or guests can send feedback directly from your frontend. Submissions land in the same Drafts overview, marked with a WWW pill (vs. MAIL for email-sourced messages).

Enable

  1. Open the Ghostwriter admin → SettingsFeedback-Kanal.
  2. Toggle Feedback-Formular aktivieren.
  3. Optionally configure:
    • Betreff-Feld einblenden und verpflichten — show + require a subject input.
    • E-Mail bei Gast-Feedback verlangen — when off, guests can submit without an email (those submissions become reply-orphans; the Reply button is disabled for them).
    • Themen — optional dropdown values (e.g. Bug, Feature, Billing).
    • Rate-Limit pro Minute / IP — per-IP submissions per minute (default 5).

Embed

Drop the component anywhere in your host Blade:

That's it — no JavaScript, no extra route, no config file changes. The component:

Replies go out through the same SMTP path as email-sourced drafts.

Quick start

The GuardedAgentRunner runs Gaze around the LLM call. With GHOSTWRITER_GAZE_ENABLED=true the prompt is sanitized via gaze clean, the model only sees redacted text, and every string in the structured response is restored before persistence. With GHOSTWRITER_GAZE_ENABLED=false the runner short-circuits with GazeDisabledException — there is no bypass branch.

Privacy boundaries

This package routes every text prompt and structured LLM response through the empiretwo/gaze-laravel boundary. With gaze_enabled=true, prompts are passed through gaze clean before they reach the model, and the restore step puts placeholder tokens back into the model output before persistence.

Image attachments are NOT redacted. Gaze is a text-only boundary. When a ticket / draft includes screenshots or other image attachments, they are sent to the configured AI provider as-is. Treat image upload as out-of-band PII exposure and disable image attachments if your compliance posture forbids it.

Embeddings are sent through Gaze::clean() only (no restore — the vectors are stored, not shown back to the user). When the boundary is off, the embedding path is skipped entirely (fail-closed). Both the per-chunk indexing path (ChunkEmbeddingService) and the per-query RAG retrieval path (DraftGeneratorService) follow this rule — RAG recall degrades rather than leaks PII.

GitHub issue export runs the inbound mail body through the same Sanitizer (Gaze::clean() only). When the boundary is off, the host's own heuristics take over (or the export is skipped depending on the ai_sanitize_mail_body flag).

Outbound SMTP sends the agent-restored draft text. The draft body persisted in support_drafts.draft_body is the post-Gaze::restore() string; SMTP transmits whatever the human reviewer (or the agent) produced after the restore step. There is no second redaction pass before send — review the draft before clicking send.

Console commands

Admin UI routes

Mounted under the configured route_prefix (default /ghostwriter):

Path Component
/ Drafts list
/drafts/{draft} Draft detail
/settings Signing profile, IMAP/SMTP diagnostics, scheduler pause
/prompt-editor Global + per-user additional prompt rules
/prompt-history Token + cost history
/smart-actions Smart-action marker manager
/gaze-log Per-draft Gaze invocation log

The bundled views use flux: UI primitives (Flux UI by Livewire). Hosts not on Flux UI can publish the views and replace the components with their own primitives — the Livewire backing classes don't depend on Flux.

Testing

Some bundled tests reference host-specific fixtures (User factory, Customer / Artist / Release / Ticket models, App\Features\GhostwriterGaze) — these are marked with a GHOSTWRITER-TODO comment at the top and will not pass until you provide local fixtures. Tests without such markers (e.g. CosineSimilarityTest, MailReplyHistorySplitterTest, PlaceholderSentinelTest, etc.) are pure utility tests that should pass out of the box once composer install finishes.

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.


All versions of gaze-ghostwriter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
ext-json Version *
ext-mbstring Version *
illuminate/console Version ^12.0
illuminate/contracts Version ^12.0
illuminate/database Version ^12.0
illuminate/http Version ^12.0
illuminate/notifications Version ^12.0
illuminate/queue Version ^12.0
illuminate/support Version ^12.0
laravel/ai Version ^0.4.3
livewire/livewire Version ^4.0
empiretwo/gaze-laravel Version ^0.6
symfony/mailer Version ^7.0
symfony/mime Version ^7.0
webklex/laravel-imap Version ^6.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 empire2/gaze-ghostwriter contains the following files

Loading the files please wait ...