@n1k1t/pipelain 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/report/index.hbs +245 -0
- package/assets/report/main.css +552 -0
- package/assets/report/main.js +14 -0
- package/lib/src/env.d.ts +5 -1
- package/lib/src/env.d.ts.map +1 -1
- package/lib/src/env.js +5 -1
- package/lib/src/env.js.map +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/src/models/pipeline/model.d.ts +10 -6
- package/lib/src/models/pipeline/model.d.ts.map +1 -1
- package/lib/src/models/pipeline/model.js +120 -33
- package/lib/src/models/pipeline/model.js.map +1 -1
- package/lib/src/models/pipeline/report/index.d.ts +14 -0
- package/lib/src/models/pipeline/report/index.d.ts.map +1 -0
- package/lib/src/models/pipeline/report/index.js +96 -0
- package/lib/src/models/pipeline/report/index.js.map +1 -0
- package/lib/src/models/pipeline/report/types.d.ts +53 -0
- package/lib/src/models/pipeline/report/types.d.ts.map +1 -0
- package/lib/src/models/pipeline/report/types.js +3 -0
- package/lib/src/models/pipeline/report/types.js.map +1 -0
- package/lib/src/models/pipeline/session.d.ts +34 -8
- package/lib/src/models/pipeline/session.d.ts.map +1 -1
- package/lib/src/models/pipeline/session.js +16 -5
- package/lib/src/models/pipeline/session.js.map +1 -1
- package/lib/src/models/pipeline/stdout/compiled/console.d.ts.map +1 -1
- package/lib/src/models/pipeline/stdout/compiled/console.js +10 -4
- package/lib/src/models/pipeline/stdout/compiled/console.js.map +1 -1
- package/lib/src/models/pipeline/stdout/model.d.ts.map +1 -1
- package/lib/src/models/pipeline/stdout/model.js +4 -2
- package/lib/src/models/pipeline/stdout/model.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/model.d.ts +6 -2
- package/lib/src/models/pipeline/steps/ai/actions/model.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/model.js +4 -2
- package/lib/src/models/pipeline/steps/ai/actions/model.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/reasoning.d.ts +17 -2
- package/lib/src/models/pipeline/steps/ai/actions/reasoning.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/reasoning.js +20 -4
- package/lib/src/models/pipeline/steps/ai/actions/reasoning.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/tool.d.ts +19 -2
- package/lib/src/models/pipeline/steps/ai/actions/tool.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/actions/tool.js +22 -7
- package/lib/src/models/pipeline/steps/ai/actions/tool.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/errors.d.ts +4 -1
- package/lib/src/models/pipeline/steps/ai/errors.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/errors.js +15 -9
- package/lib/src/models/pipeline/steps/ai/errors.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/index.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/index.js +40 -14
- package/lib/src/models/pipeline/steps/ai/index.js.map +1 -1
- package/lib/src/models/pipeline/steps/ai/utils.d.ts +1 -1
- package/lib/src/models/pipeline/steps/ai/utils.d.ts.map +1 -1
- package/lib/src/models/pipeline/steps/ai/utils.js +6 -6
- package/lib/src/models/pipeline/steps/ai/utils.js.map +1 -1
- package/lib/src/setup.js +17 -0
- package/lib/src/setup.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
<html lang="en">
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="UTF-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
+
|
|
6
|
+
<title>PipelAIn Report</title>
|
|
7
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjM2I4MmY2IiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIGQ9Ik0xMyAyTDMgMTRoOWwtMSA4IDEwLTEyaC05bDEtOHoiIC8+PC9zdmc+">
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
{{{assets.main.style}}}
|
|
11
|
+
</style>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class="container">
|
|
15
|
+
<!-- Header -->
|
|
16
|
+
<header class="header">
|
|
17
|
+
<div class="header-main">
|
|
18
|
+
<h1 class="title">
|
|
19
|
+
<svg class="logo-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
20
|
+
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" />
|
|
21
|
+
</svg>
|
|
22
|
+
PipelAIn Report
|
|
23
|
+
</h1>
|
|
24
|
+
<div class="session-info">
|
|
25
|
+
<div class="info-item">
|
|
26
|
+
<span class="info-label">Session ID:</span>
|
|
27
|
+
<span class="info-value text-mono">{{session.id}}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="info-item">
|
|
30
|
+
<span class="info-label">Timestamp:</span>
|
|
31
|
+
<span class="info-value">{{formatDate session.timestamp}} {{formatTime session.timestamp}}</span>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Overall Usage -->
|
|
37
|
+
<div class="metrics-grid">
|
|
38
|
+
<div class="metric-card">
|
|
39
|
+
<div class="metric-label">Total Tokens</div>
|
|
40
|
+
<div class="metric-value">{{sum usage.llm.total.prompt usage.llm.total.completion}}</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="metric-card">
|
|
43
|
+
<div class="metric-label">Prompt Tokens</div>
|
|
44
|
+
<div class="metric-value">{{usage.llm.total.prompt}}</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="metric-card">
|
|
47
|
+
<div class="metric-label">Completion Tokens</div>
|
|
48
|
+
<div class="metric-value">{{usage.llm.total.completion}}</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</header>
|
|
52
|
+
|
|
53
|
+
<!-- Snapshots -->
|
|
54
|
+
<main class="snapshots-section">
|
|
55
|
+
<h2 class="section-title">Steps <span class="text-muted">({{snapshots.length}})</span></h2>
|
|
56
|
+
|
|
57
|
+
<div class="snapshots-list">
|
|
58
|
+
{{#each snapshots}}
|
|
59
|
+
<details class="snapshot-card {{#if error}}state-error{{else}}state-done{{/if}}">
|
|
60
|
+
<summary class="snapshot-summary">
|
|
61
|
+
<div class="summary-left">
|
|
62
|
+
<span class="expand-arrow">▶</span>
|
|
63
|
+
<span class="step-title">{{step.title}}</span>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="summary-right">
|
|
66
|
+
<span class="llm-tag text-muted">{{llm.name}}/{{llm.model}}</span>
|
|
67
|
+
{{#if error}}
|
|
68
|
+
<span class="badge badge-error">ERROR</span>
|
|
69
|
+
{{else}}
|
|
70
|
+
{{#if usage.totalTokens}}
|
|
71
|
+
<span class="usage-tag">{{usage.totalTokens}} tokens</span>
|
|
72
|
+
{{/if}}
|
|
73
|
+
<span class="badge badge-success">DONE</span>
|
|
74
|
+
{{/if}}
|
|
75
|
+
<span class="time-tag text-muted">{{formatTime timestamp}}</span>
|
|
76
|
+
</div>
|
|
77
|
+
</summary>
|
|
78
|
+
|
|
79
|
+
<div class="snapshot-content">
|
|
80
|
+
<!-- Step Metrics -->
|
|
81
|
+
<div class="step-meta">
|
|
82
|
+
<div class="step-meta-item">
|
|
83
|
+
<span class="text-muted">Model:</span>
|
|
84
|
+
<span class="text-mono">{{llm.name}}/{{llm.model}}</span>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
{{#if usage}}
|
|
88
|
+
<div class="step-meta-item">
|
|
89
|
+
<span class="text-muted">Usage:</span>
|
|
90
|
+
<span class="text-mono">{{usage.inputTokens}} (prompt) + {{usage.outputTokens}} (completion)</span>
|
|
91
|
+
</div>
|
|
92
|
+
{{/if}}
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
{{#if error}}
|
|
96
|
+
<div class="error-box">
|
|
97
|
+
<div class="error-header">
|
|
98
|
+
<svg class="error-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
99
|
+
<circle cx="12" cy="12" r="10" />
|
|
100
|
+
<line x1="12" y1="8" x2="12" y2="12" />
|
|
101
|
+
<line x1="12" y1="16" x2="12.01" y2="16" />
|
|
102
|
+
</svg>
|
|
103
|
+
<span class="error-type">{{error.type}}</span>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="error-message">{{error.reason}}</div>
|
|
106
|
+
</div>
|
|
107
|
+
{{/if}}
|
|
108
|
+
|
|
109
|
+
<!-- Messages -->
|
|
110
|
+
<details class="messages-card">
|
|
111
|
+
<summary class="messages-summary">
|
|
112
|
+
<div class="summary-left">
|
|
113
|
+
<span class="expand-arrow">▶</span>
|
|
114
|
+
<span class="messages-title">Messages</span>
|
|
115
|
+
</div>
|
|
116
|
+
</summary>
|
|
117
|
+
<div class="messages-content">
|
|
118
|
+
<div class="message-block">
|
|
119
|
+
<div class="io-title">System</div>
|
|
120
|
+
<pre><code>{{messages.system}}</code></pre>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="message-block">
|
|
123
|
+
<div class="io-title">User</div>
|
|
124
|
+
<pre><code>{{messages.user}}</code></pre>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</details>
|
|
128
|
+
|
|
129
|
+
{{#if output}}
|
|
130
|
+
<!-- Output -->
|
|
131
|
+
<details class="output-card">
|
|
132
|
+
<summary class="output-summary">
|
|
133
|
+
<div class="summary-left">
|
|
134
|
+
<span class="expand-arrow">▶</span>
|
|
135
|
+
<span class="output-title">Output</span>
|
|
136
|
+
</div>
|
|
137
|
+
</summary>
|
|
138
|
+
<div class="output-content">
|
|
139
|
+
<pre><code class="{{#if (isObject output)}}language-json{{/if}}">{{formatOutput output}}</code></pre>
|
|
140
|
+
</div>
|
|
141
|
+
</details>
|
|
142
|
+
{{/if}}
|
|
143
|
+
|
|
144
|
+
<!-- Actions List -->
|
|
145
|
+
<div class="actions-section">
|
|
146
|
+
<h3 class="actions-title">Actions <span class="text-muted">({{actions.length}})</span></h3>
|
|
147
|
+
<div class="actions-list">
|
|
148
|
+
{{#each actions}}
|
|
149
|
+
<details class="action-card action-type-{{type}}">
|
|
150
|
+
<summary class="action-summary">
|
|
151
|
+
<div class="summary-left">
|
|
152
|
+
<span class="expand-arrow">▶</span>
|
|
153
|
+
{{#if (eq type "ai:tool")}}
|
|
154
|
+
<span class="action-type-badge badge-tool">TOOL</span>
|
|
155
|
+
<span class="action-name text-mono">{{name}}</span>
|
|
156
|
+
{{else}}
|
|
157
|
+
<span class="action-type-badge badge-reasoning">REASONING</span>
|
|
158
|
+
{{/if}}
|
|
159
|
+
</div>
|
|
160
|
+
<div class="summary-right">
|
|
161
|
+
<span class="llm-tag text-muted">{{llm.name}}/{{llm.model}}</span>
|
|
162
|
+
<span class="badge badge-{{meta.state}}">{{meta.state}}</span>
|
|
163
|
+
<span class="time-tag">{{formatDuration meta.spent}}</span>
|
|
164
|
+
</div>
|
|
165
|
+
</summary>
|
|
166
|
+
|
|
167
|
+
<div class="action-content">
|
|
168
|
+
<!-- Action LLM & Details -->
|
|
169
|
+
<div class="io-title">Info</div>
|
|
170
|
+
<div class="action-meta-grid">
|
|
171
|
+
<div>
|
|
172
|
+
<span class="meta-label">Model:</span>
|
|
173
|
+
<span class="meta-value text-mono">{{llm.name}}/{{llm.model}}</span>
|
|
174
|
+
</div>
|
|
175
|
+
{{#if id}}
|
|
176
|
+
<div>
|
|
177
|
+
<span class="meta-label">Action ID:</span>
|
|
178
|
+
<span class="meta-value text-mono">{{id}}</span>
|
|
179
|
+
</div>
|
|
180
|
+
{{/if}}
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<!-- Tool Input/Output -->
|
|
184
|
+
{{#if (eq type "ai:tool")}}
|
|
185
|
+
<div class="action-io">
|
|
186
|
+
<div class="io-block">
|
|
187
|
+
<div class="io-title">Input ({{input.type}})</div>
|
|
188
|
+
<pre><code class="{{#if (eq input.type "json")}}language-json{{/if}}">{{#if (eq input.type "json")}}{{json input.value}}{{else}}{{input.value}}{{/if}}</code></pre>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
{{#if output}}
|
|
192
|
+
<div class="io-block {{#if (eq output.type "error")}}io-error{{/if}}">
|
|
193
|
+
<div class="io-title">Output ({{output.type}})</div>
|
|
194
|
+
{{#if (eq output.type "error")}}
|
|
195
|
+
<div class="error-output">
|
|
196
|
+
<pre><code>{{#if (eq output.value.type "json")}}{{json output.value.payload}}{{else}}{{output.value.payload}}{{/if}}</code></pre>
|
|
197
|
+
</div>
|
|
198
|
+
{{else}}
|
|
199
|
+
<pre><code class="{{#if (eq output.type "json")}}language-json{{/if}}">{{#if (eq output.type "json")}}{{json output.value}}{{else}}{{output.value}}{{/if}}</code></pre>
|
|
200
|
+
{{/if}}
|
|
201
|
+
</div>
|
|
202
|
+
{{/if}}
|
|
203
|
+
</div>
|
|
204
|
+
{{else}}
|
|
205
|
+
<!-- Reasoning Output -->
|
|
206
|
+
<div class="action-io">
|
|
207
|
+
<div class="io-block">
|
|
208
|
+
<div class="io-title">Reasoning Output</div>
|
|
209
|
+
<pre class="reasoning-output"><code>{{output}}</code></pre>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
{{/if}}
|
|
213
|
+
|
|
214
|
+
<div class="io-title">Provider</div>
|
|
215
|
+
<div class="action-meta-grid">
|
|
216
|
+
{{#if llm.options}}
|
|
217
|
+
<div class="span-all">
|
|
218
|
+
<span class="meta-label">Options:</span>
|
|
219
|
+
<pre><code class="language-json">{{json llm.options}}</code></pre>
|
|
220
|
+
</div>
|
|
221
|
+
{{/if}}
|
|
222
|
+
{{#if trace}}
|
|
223
|
+
<div class="span-all">
|
|
224
|
+
<span class="meta-label">Trace Metadata:</span>
|
|
225
|
+
<pre><code class="language-json">{{json trace}}</code></pre>
|
|
226
|
+
</div>
|
|
227
|
+
{{/if}}
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</details>
|
|
231
|
+
{{/each}}
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</details>
|
|
236
|
+
{{/each}}
|
|
237
|
+
</div>
|
|
238
|
+
</main>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<script>
|
|
242
|
+
{{{assets.main.script}}}
|
|
243
|
+
</script>
|
|
244
|
+
</body>
|
|
245
|
+
</html>
|