| 1 | package Praxo::Models; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Exporter 'import'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | our @EXPORT_OK = qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | SYSTEM USER ASSISTANT TOOL stream_kinds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | content_block tool_call message message_wire message_text message_assistant | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | message_tool tool_spec usage usage_plus request response session run_result | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | memory_record event action decision interrupt interrupt_decision | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | INTERRUPT_APPROVE INTERRUPT_EDIT INTERRUPT_REJECT INTERRUPT_RESPOND | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | SYSTEM => 'system', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | USER => 'user', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | ASSISTANT => 'assistant', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | TOOL => 'tool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | INTERRUPT_APPROVE => 'approve', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | INTERRUPT_EDIT => 'edit', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | INTERRUPT_REJECT => 'reject', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | INTERRUPT_RESPOND => 'respond', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | my @STREAM_KINDS = qw(values updates messages tasks debug checkpoint); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | ▶ | sub stream_kinds { return @STREAM_KINDS } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
stream_kinds: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | sub content_block { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
content_block: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | my %block = (type => $args{type} // 'text'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args{"type"} // "text"
MC/DC0%0/1
$args{"type"} // "text"
$args{"type"}
Truth table0%0/2
A
A= $args{"type"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | ▶ | $block{text} = $args{text} if defined $args{text}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | ▶ | $block{image_url} = $args{image_url} if defined $args{image_url}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | $block{data} = $args{data} if defined $args{data}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | return \%block; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | ▶ | sub tool_call { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
tool_call: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | id => $args{id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | name => $args{name} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | arguments => $args{arguments} // {}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"id"} // ""
$args{"name"} // ""
$args{"arguments"} // {}
MC/DC0%0/1
$args{"id"} // ""
$args{"id"}
MC/DC0%0/1
$args{"name"} // ""
$args{"name"}
MC/DC0%0/1
$args{"arguments"} // {}
$args{"arguments"}
Truth table0%0/2
A
A= $args{"id"}
Truth table0%0/2
A
A= $args{"name"}
Truth table0%0/2
A
A= $args{"arguments"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | ▶ | sub interrupt { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
interrupt: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | runId => $args{run_id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | sessionId => $args{session_id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | call => $args{call}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$args{"run_id"} // ""
$args{"session_id"} // ""
MC/DC0%0/1
$args{"run_id"} // ""
$args{"run_id"}
MC/DC0%0/1
$args{"session_id"} // ""
$args{"session_id"}
Truth table0%0/2
A
A= $args{"run_id"}
Truth table0%0/2
A
A= $args{"session_id"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | ▶ | sub interrupt_decision { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
interrupt_decision: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | my %decision = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | action => $args{action} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | response => $args{response} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | reason => $args{reason} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"action"} // ""
$args{"response"} // ""
$args{"reason"} // ""
MC/DC0%0/1
$args{"action"} // ""
$args{"action"}
MC/DC0%0/1
$args{"response"} // ""
$args{"response"}
MC/DC0%0/1
$args{"reason"} // ""
$args{"reason"}
Truth table0%0/2
A
A= $args{"action"}
Truth table0%0/2
A
A= $args{"response"}
Truth table0%0/2
A
A= $args{"reason"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | $decision{arguments} = $args{arguments} if defined $args{arguments}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | return \%decision; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | ▶ | sub message { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | role => $args{role} // USER, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | content => $args{content}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | contentBlocks => $args{content_blocks} // [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | toolCalls => $args{tool_calls} // [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | toolId => $args{tool_id}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"role"} // "user"
$args{"content_blocks"} // []
$args{"tool_calls"} // []
MC/DC0%0/1
$args{"role"} // "user"
$args{"role"}
MC/DC0%0/1
$args{"content_blocks"} // []
$args{"content_blocks"}
MC/DC0%0/1
$args{"tool_calls"} // []
$args{"tool_calls"}
Truth table0%0/2
A
A= $args{"role"}
Truth table0%0/2
A
A= $args{"content_blocks"}
Truth table0%0/2
A
A= $args{"tool_calls"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | ▶ | sub message_text { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message_text: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | my ($role, $content) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 0 | return message(role => $role, content => $content); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | sub message_assistant { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message_assistant: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | my ($content, $tool_calls) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | ▶ | return message(role => ASSISTANT, content => $content, tool_calls => $tool_calls // []); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$tool_calls // []
MC/DC0%0/1
$tool_calls // []
$tool_calls
Truth table0%0/2
A
A= $tool_calls
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | sub message_tool { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message_tool: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | my ($content, $tool_id) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | return message(role => TOOL, content => $content, tool_id => $tool_id); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | ▶ | sub message_wire { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message_wire: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | my ($message) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | my %out = (role => $message->{role}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | $out{content} = $message->{content} if defined $message->{content}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | $out{contentBlocks} = $message->{contentBlocks} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | ▶ | if ref($message->{contentBlocks}) eq 'ARRAY' && @{ $message->{contentBlocks} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $message->{"contentBlocks"} eq "ARRAY" and @{$message->{"contentBlocks"};}
MC/DC0%0/2
ref $message->{"contentBlocks"} eq "ARRAY" and @{$message->{"contentBlocks"};}
ref $message->{"contentBlocks"} eq "ARRAY"
@{$message->{"contentBlocks"};}
Truth table0%0/3
A and B
A= ref $message->{"contentBlocks"} eq "ARRAY"B= @{$message->{"contentBlocks"};}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | $out{toolCalls} = $message->{toolCalls} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | if ref($message->{toolCalls}) eq 'ARRAY' && @{ $message->{toolCalls} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $message->{"toolCalls"} eq "ARRAY" and @{$message->{"toolCalls"};}
MC/DC0%0/2
ref $message->{"toolCalls"} eq "ARRAY" and @{$message->{"toolCalls"};}
ref $message->{"toolCalls"} eq "ARRAY"
@{$message->{"toolCalls"};}
Truth table0%0/3
A and B
A= ref $message->{"toolCalls"} eq "ARRAY"B= @{$message->{"toolCalls"};}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | $out{toolId} = $message->{toolId} if defined $message->{toolId}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | return \%out; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | ▶ | sub tool_spec { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
tool_spec: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | name => $args{name} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | description => $args{description} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | parameters => $args{parameters}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | risk => $args{risk}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$args{"name"} // ""
$args{"description"} // ""
MC/DC0%0/1
$args{"name"} // ""
$args{"name"}
MC/DC0%0/1
$args{"description"} // ""
$args{"description"}
Truth table0%0/2
A
A= $args{"name"}
Truth table0%0/2
A
A= $args{"description"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | sub usage { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
usage: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | inputTokens => $args{input_tokens} // 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | outputTokens => $args{output_tokens} // 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | cachedTokens => $args{cached_tokens} // 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"input_tokens"} // 0
$args{"output_tokens"} // 0
$args{"cached_tokens"} // 0
MC/DC0%0/1
$args{"input_tokens"} // 0
$args{"input_tokens"}
MC/DC0%0/1
$args{"output_tokens"} // 0
$args{"output_tokens"}
MC/DC0%0/1
$args{"cached_tokens"} // 0
$args{"cached_tokens"}
Truth table0%0/2
A
A= $args{"input_tokens"}
Truth table0%0/2
A
A= $args{"output_tokens"}
Truth table0%0/2
A
A= $args{"cached_tokens"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | sub usage_plus { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
usage_plus: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | my ($left, $right) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | return usage( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | input_tokens => ($left->{inputTokens} // 0) + ($right->{inputTokens} // 0), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | output_tokens => ($left->{outputTokens} // 0) + ($right->{outputTokens} // 0), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | ▶ | cached_tokens => ($left->{cachedTokens} // 0) + ($right->{cachedTokens} // 0), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/12
$left->{"inputTokens"} // 0
$right->{"inputTokens"} // 0
$left->{"outputTokens"} // 0
$right->{"outputTokens"} // 0
$left->{"cachedTokens"} // 0
$right->{"cachedTokens"} // 0
MC/DC0%0/1
$left->{"inputTokens"} // 0
$left->{"inputTokens"}
MC/DC0%0/1
$right->{"inputTokens"} // 0
$right->{"inputTokens"}
MC/DC0%0/1
$left->{"outputTokens"} // 0
$left->{"outputTokens"}
MC/DC0%0/1
$right->{"outputTokens"} // 0
$right->{"outputTokens"}
MC/DC0%0/1
$left->{"cachedTokens"} // 0
$left->{"cachedTokens"}
MC/DC0%0/1
$right->{"cachedTokens"} // 0
$right->{"cachedTokens"}
Truth table0%0/2
A
A= $left->{"inputTokens"}
Truth table0%0/2
A
A= $right->{"inputTokens"}
Truth table0%0/2
A
A= $left->{"outputTokens"}
Truth table0%0/2
A
A= $right->{"outputTokens"}
Truth table0%0/2
A
A= $left->{"cachedTokens"}
Truth table0%0/2
A
A= $right->{"cachedTokens"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | sub request { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
request: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | messages => $args{messages} // [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | tools => $args{tools} // [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | toolChoice => $args{tool_choice}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | responseFormat => $args{response_format}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | temperature => $args{temperature} // 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"messages"} // []
$args{"tools"} // []
$args{"temperature"} // 0
MC/DC0%0/1
$args{"messages"} // []
$args{"messages"}
MC/DC0%0/1
$args{"tools"} // []
$args{"tools"}
MC/DC0%0/1
$args{"temperature"} // 0
$args{"temperature"}
Truth table0%0/2
A
A= $args{"messages"}
Truth table0%0/2
A
A= $args{"tools"}
Truth table0%0/2
A
A= $args{"temperature"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | sub response { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
response: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | message => $args{message}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | usage => $args{usage} // usage(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | finishReason => $args{finish_reason}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$args{"usage"} // usage()
MC/DC0%0/2
$args{"usage"} // usage()
$args{"usage"}
usage()
Truth table0%0/3
A // B
A= $args{"usage"}B= usage()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | sub session { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
session: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | id => $args{id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | ▶ | messages => $args{messages} // [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$args{"id"} // ""
$args{"messages"} // []
MC/DC0%0/1
$args{"id"} // ""
$args{"id"}
MC/DC0%0/1
$args{"messages"} // []
$args{"messages"}
Truth table0%0/2
A
A= $args{"id"}
Truth table0%0/2
A
A= $args{"messages"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | sub run_result { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
run_result: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | runId => $args{run_id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | output => $args{output} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | steps => $args{steps} // 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | usage => $args{usage} // usage(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
$args{"run_id"} // ""
$args{"output"} // ""
$args{"steps"} // 0
$args{"usage"} // usage()
MC/DC0%0/1
$args{"run_id"} // ""
$args{"run_id"}
MC/DC0%0/1
$args{"output"} // ""
$args{"output"}
MC/DC0%0/1
$args{"steps"} // 0
$args{"steps"}
MC/DC0%0/2
$args{"usage"} // usage()
$args{"usage"}
usage()
Truth table0%0/2
A
A= $args{"run_id"}
Truth table0%0/2
A
A= $args{"output"}
Truth table0%0/2
A
A= $args{"steps"}
Truth table0%0/3
A // B
A= $args{"usage"}B= usage()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | sub memory_record { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
memory_record: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | id => $args{id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | frame => $args{frame} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | content => $args{content} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | createdAt => $args{created_at}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/6
$args{"id"} // ""
$args{"frame"} // ""
$args{"content"} // ""
MC/DC0%0/1
$args{"id"} // ""
$args{"id"}
MC/DC0%0/1
$args{"frame"} // ""
$args{"frame"}
MC/DC0%0/1
$args{"content"} // ""
$args{"content"}
Truth table0%0/2
A
A= $args{"id"}
Truth table0%0/2
A
A= $args{"frame"}
Truth table0%0/2
A
A= $args{"content"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | ▶ | sub event { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
event: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | type => $args{type} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | sessionId => $args{session_id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | runId => $args{run_id}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | data => $args{data}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$args{"type"} // ""
$args{"session_id"} // ""
MC/DC0%0/1
$args{"type"} // ""
$args{"type"}
MC/DC0%0/1
$args{"session_id"} // ""
$args{"session_id"}
Truth table0%0/2
A
A= $args{"type"}
Truth table0%0/2
A
A= $args{"session_id"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | sub action { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
action: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | kind => $args{kind} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | sessionId => $args{session_id} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | toolName => $args{tool_name}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | arguments => $args{arguments}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | ▶ | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/4
$args{"kind"} // ""
$args{"session_id"} // ""
MC/DC0%0/1
$args{"kind"} // ""
$args{"kind"}
MC/DC0%0/1
$args{"session_id"} // ""
$args{"session_id"}
Truth table0%0/2
A
A= $args{"kind"}
Truth table0%0/2
A
A= $args{"session_id"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | ▶ | sub decision { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
decision: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | my (%args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | allowed => $args{allowed} ? 1 : 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | reason => $args{reason} // '', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
$args{"reason"} // ""
MC/DC0%0/1
$args{"reason"} // ""
$args{"reason"}
Truth table0%0/2
A
A= $args{"reason"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||