Polish research reports and release archive 1.2.0
Browse filesSource commit: 7beae126208e9c436101a0bc43c57d9da102e78b
- research/app_ui.py +76 -149
- research/archive_provisioning.py +1 -1
- research/fastmcp_server.py +8 -8
- research/hf_design.py +4 -48
research/app_ui.py
CHANGED
|
@@ -59,7 +59,7 @@ BROADSHEET_CSS = """
|
|
| 59 |
}
|
| 60 |
.dispatch-header {
|
| 61 |
flex: none;
|
| 62 |
-
padding:
|
| 63 |
}
|
| 64 |
.dispatch-kicker,
|
| 65 |
.dispatch-section-label,
|
|
@@ -82,15 +82,16 @@ BROADSHEET_CSS = """
|
|
| 82 |
letter-spacing: .14em;
|
| 83 |
text-transform: uppercase;
|
| 84 |
}
|
| 85 |
-
.dispatch-controls {
|
| 86 |
min-width: 0;
|
| 87 |
-
margin-left:
|
| 88 |
align-items: center;
|
| 89 |
justify-content: flex-end;
|
| 90 |
flex-wrap: wrap;
|
| 91 |
}
|
| 92 |
.dispatch-stats {
|
| 93 |
min-width: 0;
|
|
|
|
| 94 |
align-items: center;
|
| 95 |
color: var(--muted-foreground);
|
| 96 |
}
|
|
@@ -102,12 +103,6 @@ BROADSHEET_CSS = """
|
|
| 102 |
text-transform: uppercase;
|
| 103 |
white-space: nowrap;
|
| 104 |
}
|
| 105 |
-
.dispatch-control-divider {
|
| 106 |
-
width: 1px;
|
| 107 |
-
height: 16px;
|
| 108 |
-
flex: none;
|
| 109 |
-
background: var(--border);
|
| 110 |
-
}
|
| 111 |
.dispatch-status {
|
| 112 |
min-height: 25px;
|
| 113 |
padding: 4px 11px;
|
|
@@ -140,7 +135,7 @@ BROADSHEET_CSS = """
|
|
| 140 |
animation: dispatch-pulse 1.4s ease-in-out infinite;
|
| 141 |
}
|
| 142 |
.dispatch-header-separator {
|
| 143 |
-
margin:
|
| 144 |
}
|
| 145 |
.dispatch-query-row {
|
| 146 |
min-width: 0;
|
|
@@ -211,43 +206,16 @@ BROADSHEET_CSS = """
|
|
| 211 |
border-radius: 4px;
|
| 212 |
background: var(--muted-foreground);
|
| 213 |
}
|
| 214 |
-
.dispatch-report-
|
| 215 |
display: grid;
|
| 216 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
| 217 |
-
gap:
|
| 218 |
-
margin
|
| 219 |
-
}
|
| 220 |
-
.dispatch-report-card {
|
| 221 |
-
min-width: 0;
|
| 222 |
-
padding: 18px 14px 14px;
|
| 223 |
-
border: 1px solid var(--border);
|
| 224 |
-
border-radius: var(--radius);
|
| 225 |
-
background: var(--card);
|
| 226 |
-
}
|
| 227 |
-
.dispatch-report-card-title {
|
| 228 |
-
margin-top: 10px;
|
| 229 |
-
font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
|
| 230 |
-
font-size: 18px;
|
| 231 |
-
font-weight: 500;
|
| 232 |
-
line-height: 1.25;
|
| 233 |
-
}
|
| 234 |
-
.dispatch-report-card-copy {
|
| 235 |
-
min-height: 42px;
|
| 236 |
-
margin-top: 10px;
|
| 237 |
-
color: var(--muted-foreground);
|
| 238 |
-
font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
|
| 239 |
-
font-size: 14px;
|
| 240 |
-
line-height: 1.5;
|
| 241 |
-
text-wrap: pretty;
|
| 242 |
}
|
| 243 |
.dispatch-report-action {
|
| 244 |
width: 100%;
|
| 245 |
-
margin-top: 14px;
|
| 246 |
color: var(--dispatch-accent);
|
| 247 |
}
|
| 248 |
-
.dispatch-archive-card {
|
| 249 |
-
grid-column: 1 / -1;
|
| 250 |
-
}
|
| 251 |
.dispatch-markdown-report {
|
| 252 |
margin-top: 16px;
|
| 253 |
padding: 22px;
|
|
@@ -405,7 +373,7 @@ BROADSHEET_CSS = """
|
|
| 405 |
text-wrap: pretty;
|
| 406 |
}
|
| 407 |
.dispatch-read-confirmation {
|
| 408 |
-
margin
|
| 409 |
color: var(--muted-foreground);
|
| 410 |
font-size: 11px;
|
| 411 |
}
|
|
@@ -458,6 +426,18 @@ BROADSHEET_CSS = """
|
|
| 458 |
font-size: 9px;
|
| 459 |
opacity: .6;
|
| 460 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
.dispatch-dialog-actions {
|
| 462 |
margin-top: 8px;
|
| 463 |
justify-content: flex-end;
|
|
@@ -482,7 +462,7 @@ BROADSHEET_CSS = """
|
|
| 482 |
box-shadow: none;
|
| 483 |
}
|
| 484 |
.dispatch-header {
|
| 485 |
-
padding:
|
| 486 |
}
|
| 487 |
.dispatch-topbar,
|
| 488 |
.dispatch-query-row {
|
|
@@ -491,10 +471,13 @@ BROADSHEET_CSS = """
|
|
| 491 |
.dispatch-topbar {
|
| 492 |
flex-wrap: wrap;
|
| 493 |
}
|
| 494 |
-
.dispatch-
|
|
|
|
| 495 |
width: 100%;
|
| 496 |
-
margin
|
| 497 |
-
|
|
|
|
|
|
|
| 498 |
}
|
| 499 |
.dispatch-query-row {
|
| 500 |
flex-direction: column;
|
|
@@ -506,9 +489,6 @@ BROADSHEET_CSS = """
|
|
| 506 |
.dispatch-body {
|
| 507 |
padding: 0 20px;
|
| 508 |
}
|
| 509 |
-
.dispatch-report-grid {
|
| 510 |
-
grid-template-columns: 1fr;
|
| 511 |
-
}
|
| 512 |
.dispatch-log-footer {
|
| 513 |
margin: 0;
|
| 514 |
}
|
|
@@ -527,16 +507,13 @@ BROADSHEET_CSS = """
|
|
| 527 |
}
|
| 528 |
}
|
| 529 |
@media (max-width: 460px) {
|
| 530 |
-
.dispatch-
|
| 531 |
-
|
| 532 |
-
}
|
| 533 |
-
.dispatch-stats {
|
| 534 |
-
width: 100%;
|
| 535 |
-
justify-content: space-between;
|
| 536 |
}
|
| 537 |
-
.dispatch-
|
| 538 |
-
|
| 539 |
}
|
|
|
|
| 540 |
.dispatch-current-copy {
|
| 541 |
font-size: 20px;
|
| 542 |
}
|
|
@@ -695,21 +672,19 @@ def build_research_ui(
|
|
| 695 |
"Research Agent",
|
| 696 |
css_class="hf-brand-product",
|
| 697 |
)
|
| 698 |
-
with Row(css_class="dispatch-
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
| 703 |
-
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
Div(css_class="dispatch-control-divider")
|
| 712 |
-
|
| 713 |
with If(
|
| 714 |
(STATE.job.status == "queued")
|
| 715 |
| (STATE.job.status == "running")
|
|
@@ -829,84 +804,6 @@ def build_research_ui(
|
|
| 829 |
| (STATE.job.status == "finalizing")
|
| 830 |
| (STATE.job.status == "completed")
|
| 831 |
):
|
| 832 |
-
with Div(css_class="dispatch-report-grid"):
|
| 833 |
-
with Column(css_class="dispatch-report-card", gap=0):
|
| 834 |
-
Text("Markdown", css_class="dispatch-section-label")
|
| 835 |
-
Text(
|
| 836 |
-
"Research summary",
|
| 837 |
-
css_class="dispatch-report-card-title",
|
| 838 |
-
)
|
| 839 |
-
Text(
|
| 840 |
-
"{{ job.markdown_report ? "
|
| 841 |
-
"'Ready to read or continue in chat.' : "
|
| 842 |
-
"'The written report will appear here as soon "
|
| 843 |
-
"as it is ready.' }}",
|
| 844 |
-
css_class="dispatch-report-card-copy",
|
| 845 |
-
)
|
| 846 |
-
Button(
|
| 847 |
-
"{{ job.markdown_report ? 'Add to chat' : "
|
| 848 |
-
"'Preparing Markdown…' }}",
|
| 849 |
-
variant="outline",
|
| 850 |
-
css_class="dispatch-report-action",
|
| 851 |
-
disabled=(
|
| 852 |
-
STATE.chat_sent | ~STATE.job.markdown_report
|
| 853 |
-
),
|
| 854 |
-
onClick=read_report,
|
| 855 |
-
)
|
| 856 |
-
with If(STATE.chat_sent):
|
| 857 |
-
Text(
|
| 858 |
-
"Added to chat.",
|
| 859 |
-
css_class="dispatch-read-confirmation",
|
| 860 |
-
)
|
| 861 |
-
with Column(css_class="dispatch-report-card", gap=0):
|
| 862 |
-
Text("Interactive", css_class="dispatch-section-label")
|
| 863 |
-
Text(
|
| 864 |
-
"Full HTML report",
|
| 865 |
-
css_class="dispatch-report-card-title",
|
| 866 |
-
)
|
| 867 |
-
Text(
|
| 868 |
-
"{{ job.html_report_ready ? "
|
| 869 |
-
"'Charts, tables and sources — ready to open.' : "
|
| 870 |
-
"'The interactive report is being built from "
|
| 871 |
-
"the research findings.' }}",
|
| 872 |
-
css_class="dispatch-report-card-copy",
|
| 873 |
-
)
|
| 874 |
-
Button(
|
| 875 |
-
"{{ job.html_report_ready ? 'Open report' : "
|
| 876 |
-
"'Building HTML report…' }}",
|
| 877 |
-
variant="outline",
|
| 878 |
-
css_class="dispatch-report-action",
|
| 879 |
-
disabled=~STATE.job.html_report_ready,
|
| 880 |
-
onClick=OpenLink(STATE.job.html_report_url),
|
| 881 |
-
)
|
| 882 |
-
with If(STATE.job.archive_space_url):
|
| 883 |
-
with Column(
|
| 884 |
-
css_class=(
|
| 885 |
-
"dispatch-report-card dispatch-archive-card"
|
| 886 |
-
),
|
| 887 |
-
gap=0,
|
| 888 |
-
):
|
| 889 |
-
Text(
|
| 890 |
-
"Archive",
|
| 891 |
-
css_class="dispatch-section-label",
|
| 892 |
-
)
|
| 893 |
-
Text(
|
| 894 |
-
"All research reports",
|
| 895 |
-
css_class="dispatch-report-card-title",
|
| 896 |
-
)
|
| 897 |
-
Text(
|
| 898 |
-
"Browse this report alongside previous "
|
| 899 |
-
"research runs and their generated files.",
|
| 900 |
-
css_class="dispatch-report-card-copy",
|
| 901 |
-
)
|
| 902 |
-
Button(
|
| 903 |
-
"Browse archive",
|
| 904 |
-
variant="outline",
|
| 905 |
-
css_class="dispatch-report-action",
|
| 906 |
-
onClick=OpenLink(
|
| 907 |
-
STATE.job.archive_space_url,
|
| 908 |
-
),
|
| 909 |
-
)
|
| 910 |
with If(STATE.job.markdown_report):
|
| 911 |
with Div(css_class="dispatch-markdown-report"):
|
| 912 |
Text(
|
|
@@ -917,6 +814,28 @@ def build_research_ui(
|
|
| 917 |
STATE.job.markdown_report,
|
| 918 |
css_class="dispatch-markdown-body",
|
| 919 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 920 |
|
| 921 |
with If("{{ job.done && job.activity_roll.length > 0 }}"):
|
| 922 |
with Div(css_class="dispatch-log dispatch-log-body"):
|
|
@@ -1009,6 +928,14 @@ def build_research_ui(
|
|
| 1009 |
"{{ job.trace_path || 'Trace pending' }}",
|
| 1010 |
css_class="dispatch-trace",
|
| 1011 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1012 |
Text(STATE.app_version, css_class="dispatch-build")
|
| 1013 |
|
| 1014 |
return ui
|
|
|
|
| 59 |
}
|
| 60 |
.dispatch-header {
|
| 61 |
flex: none;
|
| 62 |
+
padding: 22px 36px 14px;
|
| 63 |
}
|
| 64 |
.dispatch-kicker,
|
| 65 |
.dispatch-section-label,
|
|
|
|
| 82 |
letter-spacing: .14em;
|
| 83 |
text-transform: uppercase;
|
| 84 |
}
|
| 85 |
+
.dispatch-status-controls {
|
| 86 |
min-width: 0;
|
| 87 |
+
margin-left: 10px;
|
| 88 |
align-items: center;
|
| 89 |
justify-content: flex-end;
|
| 90 |
flex-wrap: wrap;
|
| 91 |
}
|
| 92 |
.dispatch-stats {
|
| 93 |
min-width: 0;
|
| 94 |
+
margin-left: auto;
|
| 95 |
align-items: center;
|
| 96 |
color: var(--muted-foreground);
|
| 97 |
}
|
|
|
|
| 103 |
text-transform: uppercase;
|
| 104 |
white-space: nowrap;
|
| 105 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
.dispatch-status {
|
| 107 |
min-height: 25px;
|
| 108 |
padding: 4px 11px;
|
|
|
|
| 135 |
animation: dispatch-pulse 1.4s ease-in-out infinite;
|
| 136 |
}
|
| 137 |
.dispatch-header-separator {
|
| 138 |
+
margin: 14px 0 16px;
|
| 139 |
}
|
| 140 |
.dispatch-query-row {
|
| 141 |
min-width: 0;
|
|
|
|
| 206 |
border-radius: 4px;
|
| 207 |
background: var(--muted-foreground);
|
| 208 |
}
|
| 209 |
+
.dispatch-report-actions {
|
| 210 |
display: grid;
|
| 211 |
grid-template-columns: repeat(2, minmax(0, 1fr));
|
| 212 |
+
gap: 10px;
|
| 213 |
+
margin: 12px 0 22px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
}
|
| 215 |
.dispatch-report-action {
|
| 216 |
width: 100%;
|
|
|
|
| 217 |
color: var(--dispatch-accent);
|
| 218 |
}
|
|
|
|
|
|
|
|
|
|
| 219 |
.dispatch-markdown-report {
|
| 220 |
margin-top: 16px;
|
| 221 |
padding: 22px;
|
|
|
|
| 373 |
text-wrap: pretty;
|
| 374 |
}
|
| 375 |
.dispatch-read-confirmation {
|
| 376 |
+
margin: -12px 0 18px;
|
| 377 |
color: var(--muted-foreground);
|
| 378 |
font-size: 11px;
|
| 379 |
}
|
|
|
|
| 426 |
font-size: 9px;
|
| 427 |
opacity: .6;
|
| 428 |
}
|
| 429 |
+
.dispatch-archive-link {
|
| 430 |
+
height: auto;
|
| 431 |
+
min-height: 0;
|
| 432 |
+
margin-left: auto;
|
| 433 |
+
padding: 0;
|
| 434 |
+
color: var(--muted-foreground);
|
| 435 |
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
| 436 |
+
font-size: 10px;
|
| 437 |
+
}
|
| 438 |
+
.dispatch-archive-link + .dispatch-build {
|
| 439 |
+
margin-left: 8px;
|
| 440 |
+
}
|
| 441 |
.dispatch-dialog-actions {
|
| 442 |
margin-top: 8px;
|
| 443 |
justify-content: flex-end;
|
|
|
|
| 462 |
box-shadow: none;
|
| 463 |
}
|
| 464 |
.dispatch-header {
|
| 465 |
+
padding: 18px 20px 12px;
|
| 466 |
}
|
| 467 |
.dispatch-topbar,
|
| 468 |
.dispatch-query-row {
|
|
|
|
| 471 |
.dispatch-topbar {
|
| 472 |
flex-wrap: wrap;
|
| 473 |
}
|
| 474 |
+
.dispatch-stats {
|
| 475 |
+
order: 3;
|
| 476 |
width: 100%;
|
| 477 |
+
margin: 9px 0 0;
|
| 478 |
+
}
|
| 479 |
+
.dispatch-status-controls {
|
| 480 |
+
margin-left: auto;
|
| 481 |
}
|
| 482 |
.dispatch-query-row {
|
| 483 |
flex-direction: column;
|
|
|
|
| 489 |
.dispatch-body {
|
| 490 |
padding: 0 20px;
|
| 491 |
}
|
|
|
|
|
|
|
|
|
|
| 492 |
.dispatch-log-footer {
|
| 493 |
margin: 0;
|
| 494 |
}
|
|
|
|
| 507 |
}
|
| 508 |
}
|
| 509 |
@media (max-width: 460px) {
|
| 510 |
+
.dispatch-report-actions {
|
| 511 |
+
grid-template-columns: 1fr;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
}
|
| 513 |
+
.dispatch-status-controls {
|
| 514 |
+
gap: 8px;
|
| 515 |
}
|
| 516 |
+
.dispatch-stats { justify-content: space-between; }
|
| 517 |
.dispatch-current-copy {
|
| 518 |
font-size: 20px;
|
| 519 |
}
|
|
|
|
| 672 |
"Research Agent",
|
| 673 |
css_class="hf-brand-product",
|
| 674 |
)
|
| 675 |
+
with Row(css_class="dispatch-stats", gap=2):
|
| 676 |
+
Text(STATE.job.elapsed, css_class="dispatch-stat")
|
| 677 |
+
Text("·", css_class="dispatch-stat")
|
| 678 |
+
Text(
|
| 679 |
+
"{{ job.event_count + ' events' }}",
|
| 680 |
+
css_class="dispatch-stat",
|
| 681 |
+
)
|
| 682 |
+
Text("·", css_class="dispatch-stat")
|
| 683 |
+
Text(
|
| 684 |
+
"{{ job.turn_count + ' turns' }}",
|
| 685 |
+
css_class="dispatch-stat",
|
| 686 |
+
)
|
| 687 |
+
with Row(css_class="dispatch-status-controls", gap=3):
|
|
|
|
|
|
|
| 688 |
with If(
|
| 689 |
(STATE.job.status == "queued")
|
| 690 |
| (STATE.job.status == "running")
|
|
|
|
| 804 |
| (STATE.job.status == "finalizing")
|
| 805 |
| (STATE.job.status == "completed")
|
| 806 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 807 |
with If(STATE.job.markdown_report):
|
| 808 |
with Div(css_class="dispatch-markdown-report"):
|
| 809 |
Text(
|
|
|
|
| 814 |
STATE.job.markdown_report,
|
| 815 |
css_class="dispatch-markdown-body",
|
| 816 |
)
|
| 817 |
+
with Div(css_class="dispatch-report-actions"):
|
| 818 |
+
Button(
|
| 819 |
+
"{{ job.markdown_report ? 'Add to chat' : "
|
| 820 |
+
"'Preparing Markdown…' }}",
|
| 821 |
+
variant="outline",
|
| 822 |
+
css_class="dispatch-report-action",
|
| 823 |
+
disabled=(STATE.chat_sent | ~STATE.job.markdown_report),
|
| 824 |
+
onClick=read_report,
|
| 825 |
+
)
|
| 826 |
+
Button(
|
| 827 |
+
"{{ job.html_report_ready ? 'Open HTML report' : "
|
| 828 |
+
"'Building HTML report…' }}",
|
| 829 |
+
variant="outline",
|
| 830 |
+
css_class="dispatch-report-action",
|
| 831 |
+
disabled=~STATE.job.html_report_ready,
|
| 832 |
+
onClick=OpenLink(STATE.job.html_report_url),
|
| 833 |
+
)
|
| 834 |
+
with If(STATE.chat_sent):
|
| 835 |
+
Text(
|
| 836 |
+
"Added to chat.",
|
| 837 |
+
css_class="dispatch-read-confirmation",
|
| 838 |
+
)
|
| 839 |
|
| 840 |
with If("{{ job.done && job.activity_roll.length > 0 }}"):
|
| 841 |
with Div(css_class="dispatch-log dispatch-log-body"):
|
|
|
|
| 928 |
"{{ job.trace_path || 'Trace pending' }}",
|
| 929 |
css_class="dispatch-trace",
|
| 930 |
)
|
| 931 |
+
with If(STATE.job.archive_space_url):
|
| 932 |
+
Button(
|
| 933 |
+
"Archive ↗",
|
| 934 |
+
variant="link",
|
| 935 |
+
size="xs",
|
| 936 |
+
css_class="dispatch-archive-link",
|
| 937 |
+
onClick=OpenLink(STATE.job.archive_space_url),
|
| 938 |
+
)
|
| 939 |
Text(STATE.app_version, css_class="dispatch-build")
|
| 940 |
|
| 941 |
return ui
|
research/archive_provisioning.py
CHANGED
|
@@ -15,7 +15,7 @@ ARCHIVE_TEMPLATE_SPACE = os.getenv(
|
|
| 15 |
"RESEARCH_ARCHIVE_TEMPLATE_SPACE",
|
| 16 |
"evalstate/research-archive-template",
|
| 17 |
)
|
| 18 |
-
ARCHIVE_TEMPLATE_VERSION = "1.
|
| 19 |
ARCHIVE_MARKER_PATH = "archive-template.json"
|
| 20 |
ARCHIVE_SPACE_NAME = "research-agent"
|
| 21 |
ARCHIVE_MOUNT_PATH = "/research"
|
|
|
|
| 15 |
"RESEARCH_ARCHIVE_TEMPLATE_SPACE",
|
| 16 |
"evalstate/research-archive-template",
|
| 17 |
)
|
| 18 |
+
ARCHIVE_TEMPLATE_VERSION = "1.2.0"
|
| 19 |
ARCHIVE_MARKER_PATH = "archive-template.json"
|
| 20 |
ARCHIVE_SPACE_NAME = "research-agent"
|
| 21 |
ARCHIVE_MOUNT_PATH = "/research"
|
research/fastmcp_server.py
CHANGED
|
@@ -76,10 +76,11 @@ def register_research_app(
|
|
| 76 |
name="research",
|
| 77 |
title="🤗 Research Agent",
|
| 78 |
description=(
|
| 79 |
-
"
|
| 80 |
-
"goal-focused
|
| 81 |
-
"
|
| 82 |
-
"
|
|
|
|
| 83 |
),
|
| 84 |
)
|
| 85 |
async def research(
|
|
@@ -87,10 +88,9 @@ def register_research_app(
|
|
| 87 |
str,
|
| 88 |
Field(
|
| 89 |
description=(
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
"sources."
|
| 94 |
)
|
| 95 |
),
|
| 96 |
],
|
|
|
|
| 76 |
name="research",
|
| 77 |
title="🤗 Research Agent",
|
| 78 |
description=(
|
| 79 |
+
"Conduct sourced research on Hugging Face. Provide specific, "
|
| 80 |
+
"goal-focused requests or tasks that state what should be established, "
|
| 81 |
+
"analysed, reproduced, or compared. State authoritative sources, "
|
| 82 |
+
"timeframes, and constraints. Produces a comprehensive report with "
|
| 83 |
+
"references, citations, and reproductions."
|
| 84 |
),
|
| 85 |
)
|
| 86 |
async def research(
|
|
|
|
| 88 |
str,
|
| 89 |
Field(
|
| 90 |
description=(
|
| 91 |
+
"The clearly stated goal of the research or reproduction task. "
|
| 92 |
+
"Provide important constraints and the preferred approach when "
|
| 93 |
+
"specified."
|
|
|
|
| 94 |
)
|
| 95 |
),
|
| 96 |
],
|
research/hf_design.py
CHANGED
|
@@ -134,7 +134,7 @@ HF_DESIGN_CSS = """
|
|
| 134 |
line-height: 1;
|
| 135 |
text-transform: uppercase;
|
| 136 |
}
|
| 137 |
-
.hf-design .dispatch-controls {
|
| 138 |
gap: 10px;
|
| 139 |
}
|
| 140 |
.hf-design .dispatch-stat {
|
|
@@ -143,9 +143,6 @@ HF_DESIGN_CSS = """
|
|
| 143 |
letter-spacing: 0;
|
| 144 |
text-transform: none;
|
| 145 |
}
|
| 146 |
-
.hf-design .dispatch-control-divider {
|
| 147 |
-
background: var(--hf-line);
|
| 148 |
-
}
|
| 149 |
.hf-design .dispatch-status {
|
| 150 |
min-height: 26px;
|
| 151 |
border: 1px solid transparent;
|
|
@@ -196,8 +193,6 @@ HF_DESIGN_CSS = """
|
|
| 196 |
}
|
| 197 |
.hf-design .dispatch-headline,
|
| 198 |
.hf-design .dispatch-query,
|
| 199 |
-
.hf-design .dispatch-report-card-title,
|
| 200 |
-
.hf-design .dispatch-report-card-copy,
|
| 201 |
.hf-design .dispatch-current-copy,
|
| 202 |
.hf-design .dispatch-event-message {
|
| 203 |
font-family: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, sans-serif;
|
|
@@ -212,20 +207,11 @@ HF_DESIGN_CSS = """
|
|
| 212 |
color: var(--hf-muted);
|
| 213 |
font-size: 14px;
|
| 214 |
}
|
| 215 |
-
.hf-design .dispatch-report-card,
|
| 216 |
.hf-design .dispatch-markdown-report,
|
| 217 |
.hf-design .dispatch-log {
|
| 218 |
border-color: var(--hf-line);
|
| 219 |
background: var(--hf-surface-soft);
|
| 220 |
}
|
| 221 |
-
.hf-design .dispatch-report-card {
|
| 222 |
-
border-radius: 11px;
|
| 223 |
-
}
|
| 224 |
-
.hf-design .dispatch-report-card-title {
|
| 225 |
-
color: var(--hf-text);
|
| 226 |
-
font-weight: 600;
|
| 227 |
-
}
|
| 228 |
-
.hf-design .dispatch-report-card-copy,
|
| 229 |
.hf-design .dispatch-time,
|
| 230 |
.hf-design .dispatch-log-line,
|
| 231 |
.hf-design .dispatch-trace,
|
|
@@ -275,10 +261,6 @@ HF_DESIGN_CSS = """
|
|
| 275 |
.hf-hub-classic .dispatch-history {
|
| 276 |
margin-top: 18px;
|
| 277 |
}
|
| 278 |
-
.hf-hub-classic .dispatch-report-card {
|
| 279 |
-
background: linear-gradient(135deg, var(--hf-surface), var(--hf-surface-soft));
|
| 280 |
-
box-shadow: 0 1px 3px rgb(15 23 42 / .04);
|
| 281 |
-
}
|
| 282 |
.hf-hub-classic .dispatch-report-action {
|
| 283 |
border-color: var(--hf-line);
|
| 284 |
background: var(--hf-surface);
|
|
@@ -347,28 +329,10 @@ HF_DESIGN_CSS = """
|
|
| 347 |
.hf-spaces-gradient .dispatch-current-block .dispatch-rule-completed {
|
| 348 |
background: var(--hf-yellow);
|
| 349 |
}
|
| 350 |
-
.hf-spaces-gradient .dispatch-report-card {
|
| 351 |
-
border: 0;
|
| 352 |
-
background: linear-gradient(145deg, #34469b, #4f46e5);
|
| 353 |
-
color: #fff;
|
| 354 |
-
box-shadow: 0 8px 20px rgb(59 70 155 / .18);
|
| 355 |
-
}
|
| 356 |
-
.hf-spaces-gradient .dispatch-report-card:nth-child(2) {
|
| 357 |
-
background: linear-gradient(145deg, #6634b8, #c02675);
|
| 358 |
-
}
|
| 359 |
-
.hf-spaces-gradient .dispatch-report-card .dispatch-section-label,
|
| 360 |
-
.hf-spaces-gradient .dispatch-report-card-title,
|
| 361 |
-
.hf-spaces-gradient .dispatch-report-card-copy {
|
| 362 |
-
color: #fff;
|
| 363 |
-
}
|
| 364 |
-
.hf-spaces-gradient .dispatch-report-card .dispatch-section-label,
|
| 365 |
-
.hf-spaces-gradient .dispatch-report-card-copy {
|
| 366 |
-
opacity: .78;
|
| 367 |
-
}
|
| 368 |
.hf-spaces-gradient .dispatch-report-action {
|
| 369 |
-
border-color: rgb(
|
| 370 |
-
background: rgb(
|
| 371 |
-
color:
|
| 372 |
}
|
| 373 |
|
| 374 |
/* Option C: a compact, structured workspace inspired by dataset browsing. */
|
|
@@ -409,14 +373,6 @@ HF_DESIGN_CSS = """
|
|
| 409 |
background:
|
| 410 |
linear-gradient(90deg, var(--hf-surface-soft) 0 4px, transparent 4px);
|
| 411 |
}
|
| 412 |
-
.hf-dataset-studio .dispatch-report-grid {
|
| 413 |
-
margin-top: 0;
|
| 414 |
-
}
|
| 415 |
-
.hf-dataset-studio .dispatch-report-card {
|
| 416 |
-
border-radius: 8px;
|
| 417 |
-
background: var(--hf-surface);
|
| 418 |
-
box-shadow: 0 1px 3px rgb(15 23 42 / .05);
|
| 419 |
-
}
|
| 420 |
.hf-dataset-studio .dispatch-current-block {
|
| 421 |
margin-top: 0;
|
| 422 |
padding: 18px 18px 20px;
|
|
|
|
| 134 |
line-height: 1;
|
| 135 |
text-transform: uppercase;
|
| 136 |
}
|
| 137 |
+
.hf-design .dispatch-status-controls {
|
| 138 |
gap: 10px;
|
| 139 |
}
|
| 140 |
.hf-design .dispatch-stat {
|
|
|
|
| 143 |
letter-spacing: 0;
|
| 144 |
text-transform: none;
|
| 145 |
}
|
|
|
|
|
|
|
|
|
|
| 146 |
.hf-design .dispatch-status {
|
| 147 |
min-height: 26px;
|
| 148 |
border: 1px solid transparent;
|
|
|
|
| 193 |
}
|
| 194 |
.hf-design .dispatch-headline,
|
| 195 |
.hf-design .dispatch-query,
|
|
|
|
|
|
|
| 196 |
.hf-design .dispatch-current-copy,
|
| 197 |
.hf-design .dispatch-event-message {
|
| 198 |
font-family: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, sans-serif;
|
|
|
|
| 207 |
color: var(--hf-muted);
|
| 208 |
font-size: 14px;
|
| 209 |
}
|
|
|
|
| 210 |
.hf-design .dispatch-markdown-report,
|
| 211 |
.hf-design .dispatch-log {
|
| 212 |
border-color: var(--hf-line);
|
| 213 |
background: var(--hf-surface-soft);
|
| 214 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
.hf-design .dispatch-time,
|
| 216 |
.hf-design .dispatch-log-line,
|
| 217 |
.hf-design .dispatch-trace,
|
|
|
|
| 261 |
.hf-hub-classic .dispatch-history {
|
| 262 |
margin-top: 18px;
|
| 263 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
.hf-hub-classic .dispatch-report-action {
|
| 265 |
border-color: var(--hf-line);
|
| 266 |
background: var(--hf-surface);
|
|
|
|
| 329 |
.hf-spaces-gradient .dispatch-current-block .dispatch-rule-completed {
|
| 330 |
background: var(--hf-yellow);
|
| 331 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
.hf-spaces-gradient .dispatch-report-action {
|
| 333 |
+
border-color: rgb(99 102 241 / .28);
|
| 334 |
+
background: rgb(99 102 241 / .08);
|
| 335 |
+
color: var(--dispatch-accent);
|
| 336 |
}
|
| 337 |
|
| 338 |
/* Option C: a compact, structured workspace inspired by dataset browsing. */
|
|
|
|
| 373 |
background:
|
| 374 |
linear-gradient(90deg, var(--hf-surface-soft) 0 4px, transparent 4px);
|
| 375 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
.hf-dataset-studio .dispatch-current-block {
|
| 377 |
margin-top: 0;
|
| 378 |
padding: 18px 18px 20px;
|