Skip to content

Commit ba1c52e

Browse files
committed
Formatting
Signed-off-by: Pushpak Chhajed <[email protected]>
1 parent f1cc9a5 commit ba1c52e

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

src/Mcp/Boost.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
use InvalidArgumentException;
88
use Laravel\Boost\Mcp\Methods\CallToolWithExecutor;
9-
use Laravel\Boost\Mcp\Prompts\ThirdPartyPrompt;
10-
use Laravel\Boost\Mcp\Resources\ThirdPartyResource;
9+
use Laravel\Boost\Mcp\Prompts\PackageGuidelinePrompt;
10+
use Laravel\Boost\Mcp\Resources\PackageGuidelineResource;
1111
use Laravel\Boost\Mcp\Tools\ApplicationInfo;
1212
use Laravel\Boost\Mcp\Tools\BrowserLogs;
1313
use Laravel\Boost\Mcp\Tools\DatabaseConnections;
@@ -141,8 +141,8 @@ protected function discoverPrompts(): array
141141
private function discoverThirdPartyPrimitives(string $primitiveType): array
142142
{
143143
$primitiveClass = match ($primitiveType) {
144-
Prompt::class => ThirdPartyPrompt::class,
145-
Resource::class => ThirdPartyResource::class,
144+
Prompt::class => PackageGuidelinePrompt::class,
145+
Resource::class => PackageGuidelineResource::class,
146146
default => throw new InvalidArgumentException('Invalid Primitive Type'),
147147
};
148148

src/Mcp/Prompts/ThirdPartyPrompt.php renamed to src/Mcp/Prompts/PackageGuidelinePrompt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Laravel\Mcp\Response;
99
use Laravel\Mcp\Server\Prompt;
1010

11-
class ThirdPartyPrompt extends Prompt
11+
class PackageGuidelinePrompt extends Prompt
1212
{
1313
use RendersBladeGuidelines;
1414

src/Mcp/Resources/ThirdPartyResource.php renamed to src/Mcp/Resources/PackageGuidelineResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Laravel\Mcp\Response;
99
use Laravel\Mcp\Server\Resource;
1010

11-
class ThirdPartyResource extends Resource
11+
class PackageGuidelineResource extends Resource
1212
{
1313
use RendersBladeGuidelines;
1414

tests/Feature/Mcp/Prompts/BladePromptTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
use Laravel\Boost\Mcp\Prompts\ThirdPartyPrompt;
5+
use Laravel\Boost\Mcp\Prompts\PackageGuidelinePrompt;
66

77
beforeEach(function (): void {
88
$this->testBladePath = sys_get_temp_dir().'/test-guideline.blade.php';
@@ -22,7 +22,7 @@
2222
});
2323

2424
it('renders a blade file as a prompt', function (): void {
25-
$prompt = new ThirdPartyPrompt('acme/payments', $this->testBladePath);
25+
$prompt = new PackageGuidelinePrompt('acme/payments', $this->testBladePath);
2626

2727
$response = $prompt->handle();
2828

@@ -34,14 +34,14 @@
3434
});
3535

3636
it('generates correct metadata from the package name', function (): void {
37-
$prompt = new ThirdPartyPrompt('acme/payments', $this->testBladePath);
37+
$prompt = new PackageGuidelinePrompt('acme/payments', $this->testBladePath);
3838

3939
expect($prompt->name())->toBe('acme/payments')
4040
->and($prompt->description())->toBe('Guidelines for acme/payments');
4141
});
4242

4343
it('handles a non-existent blade file gracefully', function (): void {
44-
$prompt = new ThirdPartyPrompt('acme/test', '/non/existent/path.blade.php');
44+
$prompt = new PackageGuidelinePrompt('acme/test', '/non/existent/path.blade.php');
4545

4646
$response = $prompt->handle();
4747

@@ -61,7 +61,7 @@
6161

6262
file_put_contents($this->testBladePath, $bladeContent);
6363

64-
$prompt = new ThirdPartyPrompt('test/package', $this->testBladePath);
64+
$prompt = new PackageGuidelinePrompt('test/package', $this->testBladePath);
6565
$response = $prompt->handle();
6666

6767
expect($response)->isToolResult()
@@ -80,7 +80,7 @@
8080

8181
file_put_contents($this->testBladePath, $bladeContent);
8282

83-
$prompt = new ThirdPartyPrompt('test/package', $this->testBladePath);
83+
$prompt = new PackageGuidelinePrompt('test/package', $this->testBladePath);
8484
$response = $prompt->handle();
8585

8686
expect($response)->isToolResult()
@@ -99,7 +99,7 @@ function example() {
9999

100100
file_put_contents($this->testBladePath, $bladeContent);
101101

102-
$prompt = new ThirdPartyPrompt('test/package', $this->testBladePath);
102+
$prompt = new PackageGuidelinePrompt('test/package', $this->testBladePath);
103103
$response = $prompt->handle();
104104

105105
expect($response)->isToolResult()
@@ -118,7 +118,7 @@ function example() {
118118

119119
file_put_contents($this->testBladePath, $bladeContent);
120120

121-
$prompt = new ThirdPartyPrompt('test/package', $this->testBladePath);
121+
$prompt = new PackageGuidelinePrompt('test/package', $this->testBladePath);
122122

123123
$response1 = $prompt->handle();
124124
$content1 = (string) $response1->content();

tests/Feature/Mcp/Resources/ThirdPartyResourceTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
use Laravel\Boost\Mcp\Resources\ThirdPartyResource;
5+
use Laravel\Boost\Mcp\Resources\PackageGuidelineResource;
66

77
beforeEach(function (): void {
88
$this->testBladePath = sys_get_temp_dir().'/test-resource-guideline.blade.php';
@@ -22,25 +22,25 @@
2222
});
2323

2424
test('it generates resource uri from the package name', function (): void {
25-
$resource = new ThirdPartyResource('acme/payments', $this->testBladePath);
25+
$resource = new PackageGuidelineResource('acme/payments', $this->testBladePath);
2626

2727
expect($resource->uri())->toBe('file://instructions/acme/payments.md');
2828
});
2929

3030
test('it generates a description from the package name', function (): void {
31-
$resource = new ThirdPartyResource('acme/payments', $this->testBladePath);
31+
$resource = new PackageGuidelineResource('acme/payments', $this->testBladePath);
3232

3333
expect($resource->description())->toBe('Guidelines for acme/payments');
3434
});
3535

3636
test('it has Markdown mime type', function (): void {
37-
$resource = new ThirdPartyResource('acme/payments', $this->testBladePath);
37+
$resource = new PackageGuidelineResource('acme/payments', $this->testBladePath);
3838

3939
expect($resource->mimeType())->toBe('text/markdown');
4040
});
4141

4242
test('it renders blade guideline content', function (): void {
43-
$resource = new ThirdPartyResource('acme/payments', $this->testBladePath);
43+
$resource = new PackageGuidelineResource('acme/payments', $this->testBladePath);
4444

4545
$response = $resource->handle();
4646

@@ -62,7 +62,7 @@
6262

6363
file_put_contents($this->testBladePath, $bladeContent);
6464

65-
$resource = new ThirdPartyResource('test/package', $this->testBladePath);
65+
$resource = new PackageGuidelineResource('test/package', $this->testBladePath);
6666
$response = $resource->handle();
6767

6868
expect($response)->isToolResult()
@@ -81,7 +81,7 @@
8181

8282
file_put_contents($this->testBladePath, $bladeContent);
8383

84-
$resource = new ThirdPartyResource('test/package', $this->testBladePath);
84+
$resource = new PackageGuidelineResource('test/package', $this->testBladePath);
8585
$response = $resource->handle();
8686

8787
expect($response)->isToolResult()
@@ -100,7 +100,7 @@ function example() {
100100

101101
file_put_contents($this->testBladePath, $bladeContent);
102102

103-
$resource = new ThirdPartyResource('test/package', $this->testBladePath);
103+
$resource = new PackageGuidelineResource('test/package', $this->testBladePath);
104104
$response = $resource->handle();
105105

106106
expect($response)->isToolResult()
@@ -119,7 +119,7 @@ function example() {
119119

120120
file_put_contents($this->testBladePath, $bladeContent);
121121

122-
$resource = new ThirdPartyResource('test/package', $this->testBladePath);
122+
$resource = new PackageGuidelineResource('test/package', $this->testBladePath);
123123

124124
$response1 = $resource->handle();
125125
$content1 = (string) $response1->content();
@@ -133,7 +133,7 @@ function example() {
133133
});
134134

135135
test('it handles non-existent blade file gracefully', function (): void {
136-
$resource = new ThirdPartyResource('acme/test', '/non/existent/path.blade.php');
136+
$resource = new PackageGuidelineResource('acme/test', '/non/existent/path.blade.php');
137137

138138
$response = $resource->handle();
139139

0 commit comments

Comments
 (0)