@portel/photon 1.17.6 → 1.18.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/dist/auto-ui/beam/photon-management.d.ts.map +1 -1
- package/dist/auto-ui/beam/photon-management.js +28 -1
- package/dist/auto-ui/beam/photon-management.js.map +1 -1
- package/dist/auto-ui/beam/routes/api-marketplace.d.ts.map +1 -1
- package/dist/auto-ui/beam/routes/api-marketplace.js +10 -5
- package/dist/auto-ui/beam/routes/api-marketplace.js.map +1 -1
- package/dist/auto-ui/streamable-http-transport.d.ts.map +1 -1
- package/dist/auto-ui/streamable-http-transport.js +259 -88
- package/dist/auto-ui/streamable-http-transport.js.map +1 -1
- package/dist/auto-ui/types.d.ts +2 -0
- package/dist/auto-ui/types.d.ts.map +1 -1
- package/dist/auto-ui/types.js +5 -0
- package/dist/auto-ui/types.js.map +1 -1
- package/dist/beam.bundle.js +226 -29
- package/dist/beam.bundle.js.map +2 -2
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +9 -8
- package/dist/loader.js.map +1 -1
- package/dist/photon-cli-runner.d.ts.map +1 -1
- package/dist/photon-cli-runner.js +11 -0
- package/dist/photon-cli-runner.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +155 -1
- package/dist/server.js.map +1 -1
- package/dist/tasks/executor.d.ts +47 -0
- package/dist/tasks/executor.d.ts.map +1 -0
- package/dist/tasks/executor.js +180 -0
- package/dist/tasks/executor.js.map +1 -0
- package/dist/tasks/store.d.ts +13 -6
- package/dist/tasks/store.d.ts.map +1 -1
- package/dist/tasks/store.js +50 -9
- package/dist/tasks/store.js.map +1 -1
- package/dist/tasks/types.d.ts +23 -2
- package/dist/tasks/types.d.ts.map +1 -1
- package/dist/tasks/types.js +23 -3
- package/dist/tasks/types.js.map +1 -1
- package/package.json +5 -4
package/dist/beam.bundle.js
CHANGED
|
@@ -24254,15 +24254,15 @@ var BeamApp = class extends i4 {
|
|
|
24254
24254
|
mcpClient.on("progress", (data) => {
|
|
24255
24255
|
this._log("info", data.message || "Processing...");
|
|
24256
24256
|
if (typeof data.progress === "number") {
|
|
24257
|
-
if (data.progress > 0
|
|
24257
|
+
if (data.progress > 0) {
|
|
24258
24258
|
this._progress = {
|
|
24259
24259
|
value: data.total ? data.progress / data.total : data.progress,
|
|
24260
24260
|
message: data.message || "Processing..."
|
|
24261
24261
|
};
|
|
24262
|
-
} else
|
|
24262
|
+
} else {
|
|
24263
24263
|
this._progress = {
|
|
24264
|
-
|
|
24265
|
-
message: data.message
|
|
24264
|
+
value: -1,
|
|
24265
|
+
message: data.message || "Processing..."
|
|
24266
24266
|
};
|
|
24267
24267
|
}
|
|
24268
24268
|
}
|
|
@@ -26785,10 +26785,10 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
26785
26785
|
}
|
|
26786
26786
|
break;
|
|
26787
26787
|
case "remember-values":
|
|
26788
|
-
this.
|
|
26788
|
+
this._toggleRememberValues();
|
|
26789
26789
|
break;
|
|
26790
26790
|
case "verbose-logging":
|
|
26791
|
-
this.
|
|
26791
|
+
this._toggleVerboseLogging();
|
|
26792
26792
|
break;
|
|
26793
26793
|
case "run-tests":
|
|
26794
26794
|
void this._runTests();
|
|
@@ -36265,12 +36265,14 @@ var ResultViewer = class extends i4 {
|
|
|
36265
36265
|
"qr",
|
|
36266
36266
|
"slides",
|
|
36267
36267
|
"checklist",
|
|
36268
|
-
"article"
|
|
36268
|
+
"article",
|
|
36269
|
+
"magazine"
|
|
36269
36270
|
].includes(format)) {
|
|
36270
36271
|
return format;
|
|
36271
36272
|
}
|
|
36272
36273
|
if (format === "md") return "markdown";
|
|
36273
36274
|
if (format === "presentation") return "slides";
|
|
36275
|
+
if (format === "article") return "magazine";
|
|
36274
36276
|
}
|
|
36275
36277
|
const data = this.result;
|
|
36276
36278
|
if (data && typeof data === "object" && !Array.isArray(data) && typeof data._photonType === "string") {
|
|
@@ -36422,8 +36424,9 @@ var ResultViewer = class extends i4 {
|
|
|
36422
36424
|
return typeof data === "string";
|
|
36423
36425
|
case "checklist":
|
|
36424
36426
|
return Array.isArray(data);
|
|
36427
|
+
case "magazine":
|
|
36425
36428
|
case "article":
|
|
36426
|
-
return typeof data === "object" && data !== null && typeof data.text === "string";
|
|
36429
|
+
return typeof data === "string" || typeof data === "object" && data !== null && typeof data.text === "string";
|
|
36427
36430
|
default:
|
|
36428
36431
|
return true;
|
|
36429
36432
|
}
|
|
@@ -36452,7 +36455,10 @@ var ResultViewer = class extends i4 {
|
|
|
36452
36455
|
case "tree":
|
|
36453
36456
|
return this._renderTree(filteredData);
|
|
36454
36457
|
case "markdown": {
|
|
36455
|
-
|
|
36458
|
+
if (Array.isArray(filteredData) && filteredData.length > 1) {
|
|
36459
|
+
return this._renderMarkdownStack(filteredData);
|
|
36460
|
+
}
|
|
36461
|
+
const mdData = Array.isArray(filteredData) ? filteredData[0] : filteredData;
|
|
36456
36462
|
return this._renderMarkdown(mdData);
|
|
36457
36463
|
}
|
|
36458
36464
|
case "html":
|
|
@@ -36489,8 +36495,9 @@ var ResultViewer = class extends i4 {
|
|
|
36489
36495
|
return this._renderSlides(filteredData);
|
|
36490
36496
|
case "checklist":
|
|
36491
36497
|
return this._renderChecklist(filteredData);
|
|
36498
|
+
case "magazine":
|
|
36492
36499
|
case "article":
|
|
36493
|
-
return this.
|
|
36500
|
+
return this._renderMagazine(filteredData);
|
|
36494
36501
|
case "json":
|
|
36495
36502
|
default:
|
|
36496
36503
|
return this._renderJson(filteredData);
|
|
@@ -36991,10 +36998,34 @@ ${rows}`);
|
|
|
36991
36998
|
}
|
|
36992
36999
|
return { body, table: tables.length ? tables.join("\n\n") + "\n\n" : "" };
|
|
36993
37000
|
}
|
|
37001
|
+
_renderMarkdownStack(rawItems) {
|
|
37002
|
+
const items = rawItems.filter((s5) => s5 && s5.trim());
|
|
37003
|
+
const marked2 = window.marked;
|
|
37004
|
+
return b2`
|
|
37005
|
+
<div style="display:flex; flex-direction:column; gap:0;">
|
|
37006
|
+
<span
|
|
37007
|
+
style="font-size:12px; color:var(--t-muted); padding-bottom:12px; border-bottom:1px solid var(--border-glass); margin-bottom:4px;"
|
|
37008
|
+
>
|
|
37009
|
+
${items.length} results
|
|
37010
|
+
</span>
|
|
37011
|
+
${items.map((item, i7) => {
|
|
37012
|
+
const htmlContent = marked2 ? marked2.parse(item, { breaks: false, gfm: true }) : item;
|
|
37013
|
+
return b2`
|
|
37014
|
+
<div
|
|
37015
|
+
class="markdown-content"
|
|
37016
|
+
style="padding:12px 0; ${i7 < items.length - 1 ? "border-bottom:1px solid var(--border-glass);" : ""}"
|
|
37017
|
+
>
|
|
37018
|
+
${o5(htmlContent)}
|
|
37019
|
+
</div>
|
|
37020
|
+
`;
|
|
37021
|
+
})}
|
|
37022
|
+
</div>
|
|
37023
|
+
`;
|
|
37024
|
+
}
|
|
36994
37025
|
_renderMarkdown(filteredData) {
|
|
36995
37026
|
const data = filteredData !== void 0 ? filteredData : this.result;
|
|
36996
37027
|
const marked2 = window.marked;
|
|
36997
|
-
if (Array.isArray(this.result) && this.result.length > 1 && marked2) {
|
|
37028
|
+
if (Array.isArray(this.result) && this.result.length > 1 && marked2 && !this.outputFormat) {
|
|
36998
37029
|
const query = this._filterQuery?.trim().toLowerCase() || "";
|
|
36999
37030
|
const allMermaidBlocks = [];
|
|
37000
37031
|
const allCodeBlocks = [];
|
|
@@ -39632,7 +39663,45 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
39632
39663
|
</div>
|
|
39633
39664
|
`;
|
|
39634
39665
|
}
|
|
39635
|
-
// ──
|
|
39666
|
+
// ── Magazine Renderer — markdown-powered multi-column layout ──
|
|
39667
|
+
_renderMagazine(data) {
|
|
39668
|
+
const text = typeof data === "string" ? data : data?.text || "";
|
|
39669
|
+
const images = (typeof data === "object" && !Array.isArray(data) ? data?.images : null) || [];
|
|
39670
|
+
if (!text) {
|
|
39671
|
+
return b2`<div class="empty-state">No content</div>`;
|
|
39672
|
+
}
|
|
39673
|
+
const columnCount = Math.min(4, Math.max(1, parseInt(this.layoutHints?.columns || "2", 10)));
|
|
39674
|
+
const marked2 = window.marked;
|
|
39675
|
+
if (!marked2) return this._renderText(text);
|
|
39676
|
+
const { html: bodyHtml, mermaidBlocks, codeBlocks } = this._parseRichMarkdown(text);
|
|
39677
|
+
const effectiveCols = columnCount;
|
|
39678
|
+
let finalHtml = bodyHtml;
|
|
39679
|
+
if (images.length > 0) {
|
|
39680
|
+
const paragraphs = finalHtml.split(/(?=<(?:p|h[23456]|blockquote)[\s>])/i);
|
|
39681
|
+
const interval = Math.max(2, Math.floor(paragraphs.length / (images.length + 1)));
|
|
39682
|
+
for (let i7 = images.length - 1; i7 >= 0; i7--) {
|
|
39683
|
+
const img = images[i7];
|
|
39684
|
+
const pos = img.position || (i7 % 2 === 0 ? "right" : "left");
|
|
39685
|
+
const maxW = pos === "full" ? "100%" : img.width ? Math.min(img.width, 280) + "px" : "280px";
|
|
39686
|
+
const imgHtml = `<div class="magazine-float ${pos}" style="max-width:${maxW}"><img src="${img.url}" alt="" loading="lazy" />${img.caption ? `<div class="caption">${img.caption}</div>` : ""}</div>`;
|
|
39687
|
+
const insertIdx = Math.min((i7 + 1) * interval, paragraphs.length - 1);
|
|
39688
|
+
paragraphs.splice(insertIdx, 0, imgHtml);
|
|
39689
|
+
}
|
|
39690
|
+
finalHtml = paragraphs.join("");
|
|
39691
|
+
}
|
|
39692
|
+
if (mermaidBlocks.length > 0) {
|
|
39693
|
+
this._pendingMermaidBlocks = mermaidBlocks;
|
|
39694
|
+
}
|
|
39695
|
+
if (codeBlocks.length > 0) {
|
|
39696
|
+
this._pendingCodeBlocks = codeBlocks;
|
|
39697
|
+
}
|
|
39698
|
+
return b2`
|
|
39699
|
+
<div class="magazine-layout markdown-content" style="column-count: ${effectiveCols}">
|
|
39700
|
+
${o5(finalHtml)}
|
|
39701
|
+
</div>
|
|
39702
|
+
`;
|
|
39703
|
+
}
|
|
39704
|
+
// ── Legacy Article Renderer (kept for backward compat, delegates to magazine) ──
|
|
39636
39705
|
_renderArticle(data) {
|
|
39637
39706
|
if (!data || typeof data.text !== "string") {
|
|
39638
39707
|
return b2`<div class="empty-state">No article content</div>`;
|
|
@@ -40612,23 +40681,20 @@ ${str}</pre
|
|
|
40612
40681
|
`;
|
|
40613
40682
|
}
|
|
40614
40683
|
return b2`
|
|
40615
|
-
<div style="max-height: 200px; overflow-y: auto;
|
|
40616
|
-
|
|
40684
|
+
<div class="dash-mini-list" style="max-height: 200px; overflow-y: auto;">
|
|
40685
|
+
<table style="width:100%; border-collapse:collapse; font-size:12px;">
|
|
40686
|
+
${value.slice(0, 5).map(
|
|
40617
40687
|
(item) => b2`
|
|
40618
|
-
|
|
40619
|
-
|
|
40620
|
-
|
|
40621
|
-
${Object.entries(item).slice(0, 3).map(
|
|
40622
|
-
([, v2]) => b2`<span
|
|
40623
|
-
style="flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;"
|
|
40624
|
-
>${String(v2)}</span
|
|
40625
|
-
>`
|
|
40688
|
+
<tr style="border-bottom: 1px solid var(--border-glass);">
|
|
40689
|
+
${Object.entries(item).slice(0, 5).map(
|
|
40690
|
+
([, v2]) => b2`<td style="padding:5px 6px; white-space:nowrap;">${String(v2)}</td>`
|
|
40626
40691
|
)}
|
|
40627
|
-
|
|
40628
|
-
|
|
40692
|
+
</tr>
|
|
40693
|
+
`
|
|
40629
40694
|
)}
|
|
40695
|
+
</table>
|
|
40630
40696
|
${value.length > 5 ? b2`<div
|
|
40631
|
-
style="padding:6px 8px;color:var(--t-muted);text-align:center;font-style:italic;"
|
|
40697
|
+
style="padding:6px 8px;color:var(--t-muted);text-align:center;font-style:italic;font-size:12px;"
|
|
40632
40698
|
>
|
|
40633
40699
|
+${value.length - 5} more
|
|
40634
40700
|
</div>` : ""}
|
|
@@ -41805,6 +41871,115 @@ ResultViewer.styles = [
|
|
|
41805
41871
|
animation: article-fade-in 0.3s ease both;
|
|
41806
41872
|
}
|
|
41807
41873
|
|
|
41874
|
+
/* Magazine: override flex/height constraints so CSS columns work */
|
|
41875
|
+
.container:has(.magazine-layout) {
|
|
41876
|
+
display: block;
|
|
41877
|
+
height: auto;
|
|
41878
|
+
overflow: auto;
|
|
41879
|
+
}
|
|
41880
|
+
|
|
41881
|
+
.container:has(.magazine-layout) > .content {
|
|
41882
|
+
flex: none;
|
|
41883
|
+
overflow: visible;
|
|
41884
|
+
}
|
|
41885
|
+
|
|
41886
|
+
/* Magazine Layout — markdown-powered multi-column */
|
|
41887
|
+
.magazine-layout {
|
|
41888
|
+
line-height: 1.7;
|
|
41889
|
+
font-size: 15px;
|
|
41890
|
+
color: var(--t-primary);
|
|
41891
|
+
column-gap: 32px;
|
|
41892
|
+
column-rule: 1px solid color-mix(in srgb, var(--border-glass) 50%, transparent);
|
|
41893
|
+
animation: article-fade-in 0.3s ease both;
|
|
41894
|
+
}
|
|
41895
|
+
|
|
41896
|
+
.magazine-layout h1 {
|
|
41897
|
+
column-span: all;
|
|
41898
|
+
margin-top: 0.6em;
|
|
41899
|
+
margin-bottom: 0.3em;
|
|
41900
|
+
}
|
|
41901
|
+
|
|
41902
|
+
.magazine-layout h1:first-child {
|
|
41903
|
+
margin-top: 0;
|
|
41904
|
+
}
|
|
41905
|
+
|
|
41906
|
+
.magazine-layout h2 {
|
|
41907
|
+
margin-top: 0.8em;
|
|
41908
|
+
margin-bottom: 0.3em;
|
|
41909
|
+
break-after: avoid;
|
|
41910
|
+
}
|
|
41911
|
+
|
|
41912
|
+
.magazine-layout > p:first-of-type::first-letter {
|
|
41913
|
+
float: left;
|
|
41914
|
+
font-size: 3.2em;
|
|
41915
|
+
line-height: 0.8;
|
|
41916
|
+
padding-right: 8px;
|
|
41917
|
+
padding-top: 4px;
|
|
41918
|
+
font-weight: 600;
|
|
41919
|
+
color: var(--accent);
|
|
41920
|
+
}
|
|
41921
|
+
|
|
41922
|
+
.magazine-float {
|
|
41923
|
+
break-inside: avoid;
|
|
41924
|
+
margin-bottom: 12px;
|
|
41925
|
+
border-radius: var(--radius-sm);
|
|
41926
|
+
overflow: hidden;
|
|
41927
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
41928
|
+
}
|
|
41929
|
+
|
|
41930
|
+
.magazine-float.left {
|
|
41931
|
+
float: left;
|
|
41932
|
+
margin: 0 20px 12px 0;
|
|
41933
|
+
max-width: 45%;
|
|
41934
|
+
shape-outside: margin-box;
|
|
41935
|
+
}
|
|
41936
|
+
|
|
41937
|
+
.magazine-float.right {
|
|
41938
|
+
float: right;
|
|
41939
|
+
margin: 0 0 12px 20px;
|
|
41940
|
+
max-width: 45%;
|
|
41941
|
+
shape-outside: margin-box;
|
|
41942
|
+
}
|
|
41943
|
+
|
|
41944
|
+
.magazine-float.full {
|
|
41945
|
+
column-span: all;
|
|
41946
|
+
width: 100%;
|
|
41947
|
+
float: none;
|
|
41948
|
+
margin: 1em 0;
|
|
41949
|
+
}
|
|
41950
|
+
|
|
41951
|
+
.magazine-float img {
|
|
41952
|
+
width: 100%;
|
|
41953
|
+
display: block;
|
|
41954
|
+
}
|
|
41955
|
+
|
|
41956
|
+
.magazine-float .caption {
|
|
41957
|
+
padding: 6px 10px;
|
|
41958
|
+
font-size: 11px;
|
|
41959
|
+
font-style: italic;
|
|
41960
|
+
color: var(--t-muted);
|
|
41961
|
+
background: var(--bg-glass);
|
|
41962
|
+
}
|
|
41963
|
+
|
|
41964
|
+
.magazine-layout p,
|
|
41965
|
+
.magazine-layout blockquote,
|
|
41966
|
+
.magazine-layout ul,
|
|
41967
|
+
.magazine-layout ol,
|
|
41968
|
+
.magazine-layout pre {
|
|
41969
|
+
break-inside: avoid;
|
|
41970
|
+
}
|
|
41971
|
+
|
|
41972
|
+
.magazine-layout blockquote {
|
|
41973
|
+
border-left: 3px solid var(--accent);
|
|
41974
|
+
padding-left: 16px;
|
|
41975
|
+
margin: 0.8em 0;
|
|
41976
|
+
color: var(--t-secondary);
|
|
41977
|
+
}
|
|
41978
|
+
|
|
41979
|
+
.magazine-layout pre {
|
|
41980
|
+
column-span: all;
|
|
41981
|
+
}
|
|
41982
|
+
|
|
41808
41983
|
.status-badge {
|
|
41809
41984
|
padding: 2px 8px;
|
|
41810
41985
|
border-radius: var(--radius-full);
|
|
@@ -42984,6 +43159,8 @@ ResultViewer.styles = [
|
|
|
42984
43159
|
border: 1px solid var(--border-glass);
|
|
42985
43160
|
border-radius: var(--radius-md);
|
|
42986
43161
|
overflow: hidden;
|
|
43162
|
+
display: flex;
|
|
43163
|
+
flex-direction: column;
|
|
42987
43164
|
}
|
|
42988
43165
|
|
|
42989
43166
|
.dashboard-panel-header {
|
|
@@ -42997,11 +43174,25 @@ ResultViewer.styles = [
|
|
|
42997
43174
|
}
|
|
42998
43175
|
|
|
42999
43176
|
.dashboard-panel-content {
|
|
43000
|
-
padding: var(--space-
|
|
43177
|
+
padding: var(--space-sm);
|
|
43001
43178
|
display: flex;
|
|
43179
|
+
flex-direction: column;
|
|
43002
43180
|
align-items: center;
|
|
43003
43181
|
justify-content: center;
|
|
43004
43182
|
text-align: center;
|
|
43183
|
+
flex: 1;
|
|
43184
|
+
min-height: 120px;
|
|
43185
|
+
}
|
|
43186
|
+
|
|
43187
|
+
/* Metrics center their big number + label */
|
|
43188
|
+
.dashboard-panel-content > .metric-card,
|
|
43189
|
+
.dashboard-panel-content > .gauge-container {
|
|
43190
|
+
display: flex;
|
|
43191
|
+
flex-direction: column;
|
|
43192
|
+
align-items: center;
|
|
43193
|
+
justify-content: center;
|
|
43194
|
+
width: 100%;
|
|
43195
|
+
flex: 1;
|
|
43005
43196
|
}
|
|
43006
43197
|
|
|
43007
43198
|
.dashboard-panel .chart-container {
|
|
@@ -43012,8 +43203,11 @@ ResultViewer.styles = [
|
|
|
43012
43203
|
align-items: center;
|
|
43013
43204
|
}
|
|
43014
43205
|
|
|
43015
|
-
|
|
43206
|
+
/* Tables and lists take full width, left-aligned */
|
|
43207
|
+
.dashboard-panel .table-wrapper,
|
|
43208
|
+
.dashboard-panel .dash-mini-list {
|
|
43016
43209
|
width: 100%;
|
|
43210
|
+
text-align: left;
|
|
43017
43211
|
}
|
|
43018
43212
|
|
|
43019
43213
|
.dashboard-panel .chart-container canvas {
|
|
@@ -43022,11 +43216,14 @@ ResultViewer.styles = [
|
|
|
43022
43216
|
}
|
|
43023
43217
|
|
|
43024
43218
|
.dashboard-panel .metric-container {
|
|
43025
|
-
padding: var(--space-
|
|
43219
|
+
padding: var(--space-md);
|
|
43220
|
+
flex: 1;
|
|
43221
|
+
justify-content: center;
|
|
43026
43222
|
}
|
|
43027
43223
|
|
|
43028
43224
|
.dashboard-panel .metric-value {
|
|
43029
|
-
font-size:
|
|
43225
|
+
font-size: 2rem;
|
|
43226
|
+
font-weight: 700;
|
|
43030
43227
|
}
|
|
43031
43228
|
|
|
43032
43229
|
/* ═══════════════════════════════════════════════════════════════
|