| 1 | package Claude::Agent::Subagent; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use 5.020; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 5 | ▶ | use Object::Proto (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 5 | ▶ | use Claude::Agent::Types; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 5 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 5 | Object::Proto::define('Claude::Agent::Subagent', | |||||||||
| 12 | 'description:Str:required', | ||||||||||
| 13 | 'prompt:Str:required', | ||||||||||
| 14 | 'tools:StrList:predicate', | ||||||||||
| 15 | 'model:Str:predicate', | ||||||||||
| 16 | ); | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 9 | ▶ | sub to_hash { | ||||||||
|
Subroutine
to_hash: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 20 | 9 | my ($self) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 9 | my $hash = { | |||||||||
| 23 | description => $self->description, | ||||||||||
| 24 | prompt => $self->prompt, | ||||||||||
| 25 | }; | ||||||||||
| 26 | |||||||||||
| 27 | 9 | ▶ | $hash->{tools} = $self->tools if $self->has_tools; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 9 | ▶ | $hash->{model} = $self->model if $self->has_model; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | |||||||||||
| 30 | 9 | return $hash; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | 5 | 1; | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||