sello 0.1.5 → 0.1.6

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/cli/sello.js CHANGED
@@ -517,6 +517,8 @@ function actionsViewModel(result )
517
517
 
518
518
  function renderActionsHtml(result ) {
519
519
  const view = actionsViewModel(result);
520
+ const actionCount = view.receipts.length;
521
+ const rejectedCount = view.rejected.length;
520
522
  const rows = view.receipts.map((record) => `
521
523
  <tr>
522
524
  <td>${escapeHtml(record.integratedTime)}</td>
@@ -533,23 +535,48 @@ function renderActionsHtml(result ) {
533
535
  <head>
534
536
  <meta charset="utf-8">
535
537
  <meta name="viewport" content="width=device-width, initial-scale=1">
538
+ <meta http-equiv="refresh" content="2">
536
539
  <title>Sello Actions</title>
537
540
  <style>
538
541
  body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 40px; color: #17201d; }
542
+ header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
543
+ h1 { margin: 0; font-size: 40px; line-height: 1.1; }
544
+ h2 { margin: 32px 0 8px; font-size: 20px; }
545
+ code { background: #eef3f0; border-radius: 4px; padding: 2px 6px; }
539
546
  table { border-collapse: collapse; width: 100%; margin-top: 16px; }
540
547
  th, td { border-bottom: 1px solid #d8dfdc; padding: 10px 8px; text-align: left; }
541
548
  th { color: #52615b; font-weight: 600; }
549
+ .summary { color: #52615b; font-size: 15px; margin: 0; white-space: nowrap; }
542
550
  .empty { color: #52615b; margin-top: 16px; }
551
+ .empty p { margin: 8px 0; }
552
+ @media (max-width: 720px) {
553
+ body { margin: 24px; }
554
+ header { display: block; }
555
+ h1 { font-size: 32px; }
556
+ .summary { margin-top: 8px; white-space: normal; }
557
+ table { display: block; overflow-x: auto; }
558
+ }
543
559
  </style>
544
560
  </head>
545
561
  <body>
546
- <h1>Sello Actions</h1>
547
- ${rows ? `<table><thead><tr><th>Integrated time</th><th>Service</th><th>Action</th><th>Result</th><th>Status</th></tr></thead><tbody>${rows}</tbody></table>` : `<p class="empty">No verified actions found yet.</p>`}
548
- ${rejected ? `<h2>Rejected receipts</h2><ul>${rejected}</ul>` : ""}
562
+ <header>
563
+ <h1>Sello Actions</h1>
564
+ <p class="summary">${escapeHtml(actionCountLabel(actionCount))}</p>
565
+ </header>
566
+ ${rows ? `<table><thead><tr><th>Integrated time</th><th>Service</th><th>Action</th><th>Result</th><th>Status</th></tr></thead><tbody>${rows}</tbody></table>` : `<section class="empty"><p>No verified actions yet.</p><p>In another terminal, run <code>npx sello emit-demo</code>.</p></section>`}
567
+ ${rejected ? `<h2>Rejected receipts</h2><p class="summary">${escapeHtml(rejectedCountLabel(rejectedCount))}</p><ul>${rejected}</ul>` : ""}
549
568
  </body>
550
569
  </html>`;
551
570
  }
552
571
 
572
+ function actionCountLabel(count ) {
573
+ return count === 1 ? "1 verified action" : `${count} verified actions`;
574
+ }
575
+
576
+ function rejectedCountLabel(count ) {
577
+ return count === 1 ? "1 rejected receipt" : `${count} rejected receipts`;
578
+ }
579
+
553
580
  function verifyHttpProof(entry ) {
554
581
  if (!isRecord(entry.proof)) {
555
582
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sello",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Reference implementation of the Sello protocol for service-signed AI agent receipts.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/src/cli/sello.ts CHANGED
@@ -518,6 +518,8 @@ function actionsViewModel(result: ReturnType<typeof verifyReceipts>): ActionsVie
518
518
 
519
519
  function renderActionsHtml(result: ReturnType<typeof verifyReceipts>): string {
520
520
  const view = actionsViewModel(result);
521
+ const actionCount = view.receipts.length;
522
+ const rejectedCount = view.rejected.length;
521
523
  const rows = view.receipts.map((record) => `
522
524
  <tr>
523
525
  <td>${escapeHtml(record.integratedTime)}</td>
@@ -534,23 +536,48 @@ function renderActionsHtml(result: ReturnType<typeof verifyReceipts>): string {
534
536
  <head>
535
537
  <meta charset="utf-8">
536
538
  <meta name="viewport" content="width=device-width, initial-scale=1">
539
+ <meta http-equiv="refresh" content="2">
537
540
  <title>Sello Actions</title>
538
541
  <style>
539
542
  body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 40px; color: #17201d; }
543
+ header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
544
+ h1 { margin: 0; font-size: 40px; line-height: 1.1; }
545
+ h2 { margin: 32px 0 8px; font-size: 20px; }
546
+ code { background: #eef3f0; border-radius: 4px; padding: 2px 6px; }
540
547
  table { border-collapse: collapse; width: 100%; margin-top: 16px; }
541
548
  th, td { border-bottom: 1px solid #d8dfdc; padding: 10px 8px; text-align: left; }
542
549
  th { color: #52615b; font-weight: 600; }
550
+ .summary { color: #52615b; font-size: 15px; margin: 0; white-space: nowrap; }
543
551
  .empty { color: #52615b; margin-top: 16px; }
552
+ .empty p { margin: 8px 0; }
553
+ @media (max-width: 720px) {
554
+ body { margin: 24px; }
555
+ header { display: block; }
556
+ h1 { font-size: 32px; }
557
+ .summary { margin-top: 8px; white-space: normal; }
558
+ table { display: block; overflow-x: auto; }
559
+ }
544
560
  </style>
545
561
  </head>
546
562
  <body>
547
- <h1>Sello Actions</h1>
548
- ${rows ? `<table><thead><tr><th>Integrated time</th><th>Service</th><th>Action</th><th>Result</th><th>Status</th></tr></thead><tbody>${rows}</tbody></table>` : `<p class="empty">No verified actions found yet.</p>`}
549
- ${rejected ? `<h2>Rejected receipts</h2><ul>${rejected}</ul>` : ""}
563
+ <header>
564
+ <h1>Sello Actions</h1>
565
+ <p class="summary">${escapeHtml(actionCountLabel(actionCount))}</p>
566
+ </header>
567
+ ${rows ? `<table><thead><tr><th>Integrated time</th><th>Service</th><th>Action</th><th>Result</th><th>Status</th></tr></thead><tbody>${rows}</tbody></table>` : `<section class="empty"><p>No verified actions yet.</p><p>In another terminal, run <code>npx sello emit-demo</code>.</p></section>`}
568
+ ${rejected ? `<h2>Rejected receipts</h2><p class="summary">${escapeHtml(rejectedCountLabel(rejectedCount))}</p><ul>${rejected}</ul>` : ""}
550
569
  </body>
551
570
  </html>`;
552
571
  }
553
572
 
573
+ function actionCountLabel(count: number): string {
574
+ return count === 1 ? "1 verified action" : `${count} verified actions`;
575
+ }
576
+
577
+ function rejectedCountLabel(count: number): string {
578
+ return count === 1 ? "1 rejected receipt" : `${count} rejected receipts`;
579
+ }
580
+
554
581
  function verifyHttpProof(entry: ReturnType<typeof deserializeEntry>): boolean {
555
582
  if (!isRecord(entry.proof)) {
556
583
  return false;