Operations and upgrades

Keep the worker/scheduler running. System health shows configuration and pending/failed work. A configured value is not proof of live service availability. Inspect private Laravel/cron logs; do not expose debug output to diagnose production.

Scheduled: billing dispatch and assistant recovery every minute, stale presentation/image generation and extraction recovery every five minutes, daily subscription reconciliation, failed-job pruning and reset-token cleanup. A generation idle for 15 minutes is recovered. Assistant sessions waiting for a user expire after 24 hours by default. Slide credits and the separate image allowance use UTC calendar months; slide refunds target the original month. Failed image rows remain for idempotency/history but do not consume image allowance. Deleting an image attachment does not erase completed image usage. A downgrade does not delete existing decks.

Run the worker with --timeout=190 and configure DB_QUEUE_RETRY_AFTER=240. For Redis or Beanstalkd, set the matching retry-after variable to at least 240; for SQS, set an equivalent visibility timeout. The image job permits 180 seconds and the provider request 160 seconds. The reservation timeout must exceed the worker timeout, preventing another worker from claiming the same in-flight request. Legacy deck/image jobs have one provider attempt. The assistant's narrowly bounded correction behavior is described below.

Assistant budgets and recovery — 1.2

The assistant performs one model decision per queue step. Its job timeout is 120 seconds and its provider timeout is 100 seconds, within the worker settings above. Keep deckixa:recover-agent-sessions in the minute scheduler. It re-dispatches unclaimed queued sequences after a delivery gap; duplicate sequence claims do not make another model request. Sessions idle in queued/running for 15 minutes are failed safely. Expiry preserves the draft and releases its slide-credit reservation.

One received HTTP-success response with invalid action JSON/envelope may be corrected automatically per run, provided call/output budget remains. The receipt is preserved and model.retrying announces the separate queued attempt. Both attempts count against the budget and can incur provider charges. A second invalid action requires explicit user recovery. There is no automatic retry for HTTP 402, transport errors/timeouts, incomplete output, context errors or revision conflicts. These rules do not increase the configured session/daily limits.

Review these positive integer settings in the private environment before enabling the assistant:

Environment setting Default Meaning
AGENT_MAX_CALLS 40 Maximum model attempts in one session, including explicit retries.
AGENT_MAX_TURNS 10 Maximum user turns, including the initial message.
AGENT_MAX_OUTPUT_TOKENS 7000 Maximum output tokens requested per model call and reserved against the daily output budget.
AGENT_DAILY_CALLS 120 Workspace-wide model attempts per UTC day.
AGENT_DAILY_OUTPUT_TOKENS 600000 Workspace-wide reserved maximum output tokens per UTC day.

Additional bounds in config/agent.php are 180,000 combined conversation/reference text characters, two requested AI images, four stock searches, six stock selections, and 24 hours waiting for a user. At most two active assistant sessions are allowed per workspace. A request can be rejected before using every nominal limit if another bound or provider capability is reached. Large edits may need smaller, focused sessions.

Version 1.3 adds local vector discovery with six searches and twenty-four new selections per agent session by default. Each search exposes at most twelve metadata results, not the full installed catalog or SVG source. Keep the shipped catalog, ID lists, SVG files and license notices together when deploying. Saved slides reference stable pack:name IDs; removing a referenced asset makes validation/export fail rather than silently substituting artwork. The asset route supports an ETag, and the frontend can include the catalog version for cache invalidation.

Daily call/output reservations occur before a model attempt and are not refunded by cancellation, failure or slide-credit refunds. They bound repeated attempts but do not enforce a dollar ceiling: input tokens, images, model prices, provider billing and uncertain network outcomes remain separate. Use restricted provider keys, provider-side spending limits and an appropriate enabled-model list. AI image tools additionally use the existing monthly image allowance and storage reservations.

Cancellation stops future agent actions and queued child image requests. An already running provider request may finish and incur cost; its late result cannot mutate the cancelled draft. Sanitized usage can still be recorded through usage.updated. reported_cost_usd is the sum of available reported costs, not proof that every attempted request was unbilled or fully accounted for.

Use explicit retry for a recoverable failed session after fixing the cause. Retry retains completed draft edits and the pinned provider/model, reserves any refunded slide credits again, and consumes the existing session/daily call budget for subsequent attempts. Revision conflicts require a fresh edit request using the latest saved deck. Do not manually reset run statuses or usage counters to retry work.

loop_detected means the model repeated the same action; it does not mean the call or credit budget was exhausted. Preserve the draft and start a new request stating the desired result. Style-only changes use a targeted style tool instead of rebuilding slides. An edit session retains its initial one-credit reservation, but unchanged slides and repeated styling do not increase it; an already satisfied style can finish without a new presentation revision.

Assistant conversations, events and drafts are persistent application data. queue:prune-failed only prunes failed queue records; it is not an assistant-data retention policy. Include these tables in encrypted backups and apply your service's retention/deletion procedures consistently. Changing budget settings requires clearing cached configuration and restarting workers.

Backups

Back up database, private storage/themes, .env and APP_KEY together. Encrypt and store backups outside public. Test restoration on a separate domain/database. A code ZIP does not restore customer data.

Upgrade

  1. Review release notes and take a restorable backup.
  2. Run php artisan down and let active work finish.
  3. Preserve .env, the entire storage tree and installed.lock.
  4. Replace application code, production vendor and built assets.
  5. Run php artisan migrate --force, php artisan optimize:clear and php artisan queue:restart.
  6. If used, rebuild config/view caches, restart workers, smoke-test, then php artisan up.

Retain old frontend chunks briefly during rolling deployments. Ask editors to reload after saving. Short-lived shared-host workers read new code on their next invocation. Roll back application code with its matching database/storage backup; theme rollback is separate.

Upgrading from 1.0 to 1.1

Apply the image-generation migration once using the normal upgrade procedure. It creates image_generations and adds plans.image_monthly_limit, with Starter 5, Studio 100 and Business 300 defaults. Review these limits and your provider spending controls before enabling image generation. Preserve customer rows, private attachments, .env, APP_KEY and installed.lock; do not reinstall or remove migration records.

Update old cron/supervisor timeout=130 entries to timeout=190 and old DB_QUEUE_RETRY_AFTER=180 values to 240, clear any cached configuration, then restart workers. Configure image defaults and an OpenRouter key privately if using the new provider. Refresh the model catalog deliberately, review enabled models and smoke-test with a small request before offering new models to customers.

Upgrading from 1.1 to 1.2

Use the normal backup/maintenance/migration procedure. The assistant migration adds agent_sessions, agent_runs, agent_messages, agent_events and agent_daily_usage; retain the existing application key because content-bearing records are encrypted. Apply the accompanying stock-photo migration as part of the same release. Deploy matching built frontend assets, confirm the new minute recovery command is scheduled, and restart workers before leaving maintenance mode.

Existing presentation records and the legacy generation endpoint remain supported. Theme authors adding the conversational UI must implement the session lifecycle and the separate snapshot version/event cursor rules documented in the browser contracts. Do not assume a terminal session has no remaining event pages. Inspect the release verification record for the distinction between isolated adapter tests and actual live checks; configuration alone does not establish provider availability.

Upgrading from 1.2 to 1.3

Deploy matching application code, built assets, resources/data/visual-assets, public/vectors/files and public/vectors/licenses. The vector library uses bundled files and existing slide JSON, with no new database table. Continue running all pending migrations through the normal upgrade procedure. Clear application/view caches and restart workers so long-lived agent steps use the new vector tool schema.

Check that catalog search, a monochrome color change, a multicolor illustration and HTML/PPTX export work on your installation path. Updated theme layouts expose vector-base and catalog-version data; older themes can derive a subdirectory vector path from their existing image-base attribute. Keep catalog IDs stable when replacing source files. Bundled SVG serves from a constrained local route with ETags and restricted CSP; customer-provided SVG markup is not a supported document field.

Troubleshooting

Symptom Check
Routes return 404 public document root and rewrite rules
Immediate 500 PHP extensions, writable storage, private Laravel log
Installer unavailable Existing installed marker; do not remove it on a live site
No auth email Queue, SMTP scheme/port, SPF/DKIM and spam folder
Generation queued Cron PHP path and worker log
Generation failed API key/model/quota, outbound HTTPS and reference limits
Image failed Image-capable model, supported controls, provider balance, private storage capacity and worker timeout
Image model missing Configured provider key, raster compatibility and refreshed catalog
PNG has a background PNG does not imply transparency; select a supported model and explicitly request a transparent background
Credits differ from invoice date UTC calendar-month quota
Paid plan not activated Signed webhook deliveries, queue, price mapping
OAuth loop Exact HTTPS callback, credentials and cookie settings
Broken theme Activate default at /admin/themes
Save conflict Preserve local backup; reload only after protecting unsaved edits
Assistant waiting for an answer Read its authored question; send an answer with consent, or cancel the session
Assistant stopped at a limit Session/user-turn limits, workspace UTC-day call/output reservations, available slide credits
Assistant shows old state Use snapshot version for metadata ordering, cursor for event pages, and drain has_more
Assistant edit conflicted Preserve its draft, save/reload the current deck, and start a request with the latest base revision
PDF differs Dedicated print view, landscape, background graphics

Removal

Export/back up data and handle existing subscriptions first. Remove only this application's dedicated domain/root/database, cron entries, keys and webhook. Do not remove shared hosting resources. Retain records according to your actual service policy.