Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Claude Agent Sdk Laravel Laravel Package

mohamed-ashraf-elsaed/claude-agent-sdk-laravel

View on GitHub
Deep Wiki
Context7
v1.3.1

Improved Package Discoverability

  • Optimized Packagist description with key search terms (Anthropic, PHP, Laravel, CLI)
  • Added 7 new keywords for better search ranking
  • Added homepage and support URLs
  • Updated 20 GitHub topics for maximum discoverability

No code changes — all features from v1.3.0 are included.

Upgrade

composer update mohamed-ashraf-elsaed/claude-agent-sdk-laravel
v1.3.0

v1.3.0 — Full SDK Parity with Official Claude Agent SDK

This release brings complete feature parity with the official TypeScript and Python Claude Agent SDKs. 22 new features, 105 new tests, zero regressions.

Highlights

Custom Permission Handling — The most requested feature. Control exactly what the agent can do:

use ClaudeAgentSDK\Permissions\PermissionResultAllow;
use ClaudeAgentSDK\Permissions\PermissionResultDeny;

$options = ClaudeAgentOptions::make()
    ->canUseTool(function (string $toolName, array $input) {
        if ($toolName === 'Bash' && str_contains($input['command'] ?? '', 'rm -rf')) {
            return new PermissionResultDeny('Destructive commands blocked');
        }
        // Redirect writes to sandbox
        if ($toolName === 'Write') {
            return new PermissionResultAllow(
                updatedInput: array_merge($input, ['file_path' => '/sandbox' . $input['file_path']])
            );
        }
        return new PermissionResultAllow();
    });

Stderr Monitoring — Capture CLI debug output:

$options->stderr(function (string $data) {
    Log::warning('Claude CLI: ' . $data);
});

Detailed Error Handling — Know exactly why the agent stopped:

$result = ClaudeAgent::query('...', $options);

$result->subtype();           // 'error_max_turns', 'error_max_budget_usd', etc.
$result->isMaxTurnsError();   // true if hit turn limit
$result->isBudgetError();     // true if budget exceeded
$result->permissionDenials(); // denied tool uses
$result->errors();            // execution errors

Session Introspection — See what the agent has access to:

$result->model();              // Model used
$result->availableTools();     // Available tools
$result->mcpServerStatus();    // MCP server statuses
$result->supportedCommands();  // Slash commands

All New Features

CRITICAL — Production Safety

  • canUseTool(callable) — Custom permission handler with IPC (runs in your PHP process)
  • stderr(callable) — Stderr output callback
  • PermissionResultAllow / PermissionResultDeny — Permission result types

HIGH — Feature Completeness

  • 6 new Hook Events: PostToolUseFailure, Notification, SessionStart, SessionEnd, SubagentStart, PermissionRequest (12 total)
  • McpServerConfig::http() — HTTP transport for MCP servers
  • permissionPromptToolName(string) — MCP permission prompt tool
  • SystemMessage detailed parsing: tools, model, mcpServers, permissionMode, slashCommands, apiKeySource, cwd
  • Result subtypes with constants and helpers
  • Result permissionDenials and errors fields

MEDIUM — Enhanced Capabilities

  • PartialAssistantMessage — Streaming partial event type
  • rewindFiles(sessionId, messageUuid) — File checkpoint restoration
  • interrupt() — Graceful agent interruption
  • Permission mode plan — Plan without executing
  • allowDangerouslySkipPermissions(bool) — Safety guard
  • Compact boundary message support
  • resumeSessionAt(string) — Resume at specific message UUID

INTROSPECTION

  • QueryResult: model(), availableTools(), mcpServerStatus(), supportedCommands()
  • ClaudeAgentManager: interrupt(), isRunning(), supportedCommands(), lastModel(), mcpServerStatus(), availableTools()

Stats

  • 29 files changed, 2,553 lines added
  • 105 new tests (299 total), 750 assertions
  • Zero regressions on existing tests

Upgrade

composer update mohamed-ashraf-elsaed/claude-agent-sdk-laravel

Full Changelog: https://github.com/mohamed-ashraf-elsaed/claude-agent-sdk-laravel/compare/v1.2.1...v1.3.0

v1.2.1

Bug Fixes

  • sandbox: Pass sandbox settings via --settings flag instead of the invalid --sandbox CLI flag (#2, #3)

What changed

The --sandbox CLI flag does not exist in the Claude Code CLI. The SDK now correctly passes sandbox configuration through the --settings flag as a JSON settings object, matching the official Claude SDK behavior.

The sandbox() method now expects the official SandboxSettings structure:

$options = ClaudeAgentOptions::make()
    ->sandbox([
        'enabled' => true,
        'autoAllowBashIfSandboxed' => true,
        'excludedCommands' => ['docker'],
        'network' => [
            'allowLocalBinding' => true,
            'allowUnixSockets' => ['/var/run/docker.sock'],
        ],
    ]);

Upgrade

composer update mohamed-ashraf-elsaed/claude-agent-sdk-laravel

Full Changelog: https://github.com/mohamed-ashraf-elsaed/claude-agent-sdk-laravel/compare/v1.2.0...v1.2.1

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope