@cfbender/cesium 0.3.6 → 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/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # Cesium
1
+ <h1>
2
+ <img src="assets/favicon.svg" alt="" width="48" height="48" align="left" style="margin-right: 12px; vertical-align: middle;">
3
+ Cesium
4
+ </h1>
2
5
 
3
6
  Cesium publishes substantive opencode agent responses — plans, code reviews,
4
7
  comparisons, explainers, audits, RFCs — as self-contained beautiful HTML artifacts
@@ -6,10 +9,6 @@ on disk, instead of dumping markdown into the terminal. The browser becomes the
6
9
  reading surface; the terminal stays the control surface. Each artifact is a single
7
10
  `.html` file: portable, archivable, viewable offline, shareable as a URL over SSH.
8
11
 
9
- v0.3.0 adds **interactive Q&A artifacts** — the agent can now publish a question
10
- form, wait for the user to answer in their browser, and receive the structured
11
- responses before continuing work.
12
-
13
12
  <video src="assets/cesium.mp4" autoplay loop muted playsinline width="720">
14
13
  Demo video — see <a href="assets/cesium.mp4">assets/cesium.mp4</a> if it
15
14
  doesn't play inline (some markdown viewers strip <code>&lt;video&gt;</code>).
@@ -51,19 +50,37 @@ unreleased changes).
51
50
 
52
51
  ### CLI
53
52
 
53
+ The CLI puts a `cesium` binary on your `PATH` for browsing, opening, and
54
+ managing artifacts (`cesium ls`, `cesium open`, `cesium serve`, `cesium prune`,
55
+ `cesium theme`).
56
+
57
+ **Recommended: install with [mise](https://mise.jdx.dev/)** so cesium is pinned
58
+ in your config and tracks with the rest of your toolchain. Add to your
59
+ `~/.config/mise/config.toml` (or a project-local `mise.toml`):
60
+
61
+ ```toml
62
+ [tools]
63
+ "npm:@cfbender/cesium" = "latest"
64
+ ```
65
+
66
+ Then run `mise install` (or `mise use -g npm:@cfbender/cesium@latest` for the
67
+ one-liner equivalent). Pin to a specific release with `"0.3.6"` instead of
68
+ `"latest"`. Upgrade with `mise upgrade npm:@cfbender/cesium`.
69
+
70
+ **Alternative: install with bun directly:**
71
+
54
72
  ```bash
55
73
  bun install -g @cfbender/cesium
56
74
  ```
57
75
 
58
- This puts a `cesium` binary on your `PATH` (at `~/.bun/bin/cesium`). If
59
- `which cesium` returns nothing, add `~/.bun/bin` to your shell rc:
76
+ This puts the binary at `~/.bun/bin/cesium`. If `which cesium` returns nothing,
77
+ add `~/.bun/bin` to your shell rc:
60
78
 
61
79
  ```bash
62
80
  export PATH="$HOME/.bun/bin:$PATH"
63
81
  ```
64
82
 
65
- Upgrade later with `bun update -g @cfbender/cesium` (or via your version
66
- manager — e.g. `mise use -g npm:@cfbender/cesium@latest`). To uninstall:
83
+ Upgrade with `bun update -g @cfbender/cesium`. Uninstall with
67
84
  `bun remove -g @cfbender/cesium`.
68
85
 
69
86
  ### Developing on cesium itself
@@ -329,6 +329,89 @@
329
329
  color: var(--muted);
330
330
  text-transform: lowercase;
331
331
  }
332
+ .pill.accent {
333
+ background: color-mix(in srgb, var(--accent) 18%, var(--surface));
334
+ color: var(--accent);
335
+ font-weight: 600;
336
+ }
337
+
338
+ /* ranked list */
339
+ .ranked-list {
340
+ display: flex;
341
+ flex-direction: column;
342
+ gap: 1em;
343
+ margin: 0 0 1.5em;
344
+ padding: 0;
345
+ list-style: none;
346
+ }
347
+ .ranked-item {
348
+ background: var(--surface);
349
+ border: 1.5px solid var(--rule);
350
+ border-radius: 12px;
351
+ padding: 22px 26px;
352
+ display: grid;
353
+ grid-template-columns: 64px 1fr;
354
+ gap: 6px 24px;
355
+ align-items: start;
356
+ }
357
+ .ranked-item .rank-num {
358
+ font-family: var(--serif);
359
+ font-size: 2.4rem;
360
+ font-weight: 500;
361
+ color: var(--oat);
362
+ line-height: 1;
363
+ letter-spacing: -0.02em;
364
+ padding-top: 2px;
365
+ }
366
+ .ranked-item .rank-title {
367
+ font-family: var(--serif);
368
+ font-size: 1.2rem;
369
+ font-weight: 600;
370
+ color: var(--ink);
371
+ margin: 0 0 6px;
372
+ line-height: 1.3;
373
+ }
374
+ .ranked-item .rank-meta {
375
+ display: flex;
376
+ align-items: center;
377
+ gap: 8px;
378
+ flex-wrap: wrap;
379
+ margin-bottom: 14px;
380
+ }
381
+ .ranked-item .rank-body > p {
382
+ color: var(--ink-soft);
383
+ font-size: 0.95rem;
384
+ line-height: 1.65;
385
+ margin: 0 0 0.85em;
386
+ }
387
+ .ranked-item .rank-body > p:last-child {
388
+ margin-bottom: 0;
389
+ }
390
+ .ranked-item .rank-body > ul,
391
+ .ranked-item .rank-body > ol {
392
+ color: var(--ink-soft);
393
+ font-size: 0.95rem;
394
+ line-height: 1.65;
395
+ margin: 0 0 0.85em;
396
+ padding-left: 1.2em;
397
+ }
398
+ .ranked-item .rank-aside {
399
+ color: var(--muted);
400
+ font-size: 0.9rem;
401
+ line-height: 1.6;
402
+ padding-left: 14px;
403
+ border-left: 2px solid var(--rule);
404
+ margin: 0;
405
+ }
406
+ .ranked-item .rank-aside-label {
407
+ font-family: var(--mono);
408
+ font-size: 0.7rem;
409
+ font-weight: 600;
410
+ letter-spacing: 0.1em;
411
+ text-transform: uppercase;
412
+ color: var(--accent);
413
+ margin-right: 6px;
414
+ }
332
415
 
333
416
  /* byline */
334
417
  .byline {
@@ -845,6 +928,72 @@
845
928
  </div>
846
929
  </section>
847
930
 
931
+ <!-- ============================================================
932
+ Section 13 · Ranked list
933
+ ============================================================ -->
934
+ <section>
935
+ <p class="eyebrow">13 · ranked-list</p>
936
+ <h2 class="h-section"><span class="section-num">13</span>Ranked list</h2>
937
+ <p>
938
+ Use <code>.ranked-list</code> + <code>.ranked-item</code> for ordered recommendations,
939
+ findings, or rankings — anything that would otherwise be a heavy numbered
940
+ <code>&lt;h3&gt;</code> sequence. Each item gets a soft serif numeral on the left and a
941
+ calm title + meta + body on the right. Pair <code>.pill.accent</code> +
942
+ <code>.tag</code> in the meta row for impact and savings; use <code>.rank-aside</code> for
943
+ a quieter "bonus" addendum.
944
+ </p>
945
+
946
+ <ol class="ranked-list">
947
+ <li class="ranked-item">
948
+ <div class="rank-num">01</div>
949
+ <div class="rank-body">
950
+ <h3 class="rank-title">Replace the styleguide payload with a compact catalog</h3>
951
+ <div class="rank-meta">
952
+ <span class="pill accent">High impact</span>
953
+ <span class="tag">~6–8k tokens / call</span>
954
+ </div>
955
+ <p>
956
+ Return a structured Markdown reference of <em>class → purpose → minimal example</em>
957
+ instead of the full HTML framework. Realistic target: 3–5 KB / ~1k tokens, down from
958
+ ~7–9k.
959
+ </p>
960
+ <p class="rank-aside">
961
+ <span class="rank-aside-label">Bonus</span>
962
+ Derive the catalog from a single source so it can't drift from the framework.
963
+ </p>
964
+ </div>
965
+ </li>
966
+ <li class="ranked-item">
967
+ <div class="rank-num">02</div>
968
+ <div class="rank-body">
969
+ <h3 class="rank-title">Trim the system prompt fragment</h3>
970
+ <div class="rank-meta">
971
+ <span class="pill">Low impact</span>
972
+ <span class="tag">~400 tokens / session</span>
973
+ </div>
974
+ <p>
975
+ Remove redundancy with in-tool <code>description</code> strings. Nice but not
976
+ transformative.
977
+ </p>
978
+ </div>
979
+ </li>
980
+ <li class="ranked-item">
981
+ <div class="rank-num">03</div>
982
+ <div class="rank-body">
983
+ <h3 class="rank-title">Stop double-emitting CSS in <code>wrapDocument()</code></h3>
984
+ <div class="rank-meta">
985
+ <span class="pill">Disk only</span>
986
+ <span class="tag">~17 KB / artifact</span>
987
+ </div>
988
+ <p>
989
+ Inline the framework only when the linked stylesheet is unavailable; emit tokens
990
+ inline always.
991
+ </p>
992
+ </div>
993
+ </li>
994
+ </ol>
995
+ </section>
996
+
848
997
  <!-- ============================================================
849
998
  Footer / byline
850
999
  ============================================================ -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfbender/cesium",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "description": "Beautiful self-contained HTML artifacts from your opencode agent.",
5
5
  "license": "MIT",
6
6
  "author": "Cody Bender",
@@ -456,6 +456,87 @@ h1, h2, h3, h4, h5, h6 {
456
456
  color: var(--muted);
457
457
  text-transform: lowercase;
458
458
  }
459
+ .pill.accent {
460
+ background: color-mix(in srgb, var(--accent) 18%, var(--surface));
461
+ color: var(--accent);
462
+ font-weight: 600;
463
+ }
464
+
465
+ /* ranked list — numbered cards for ordered recommendations / findings */
466
+ .ranked-list {
467
+ display: flex;
468
+ flex-direction: column;
469
+ gap: 1em;
470
+ margin: 0 0 1.5em;
471
+ padding: 0;
472
+ list-style: none;
473
+ }
474
+ .ranked-item {
475
+ background: var(--surface);
476
+ border: 1.5px solid var(--rule);
477
+ border-radius: 12px;
478
+ padding: 22px 26px;
479
+ display: grid;
480
+ grid-template-columns: 64px 1fr;
481
+ gap: 6px 24px;
482
+ align-items: start;
483
+ }
484
+ .ranked-item .rank-num {
485
+ font-family: var(--serif);
486
+ font-size: 2.4rem;
487
+ font-weight: 500;
488
+ color: var(--oat);
489
+ line-height: 1;
490
+ letter-spacing: -0.02em;
491
+ padding-top: 2px;
492
+ }
493
+ .ranked-item .rank-title {
494
+ font-family: var(--serif);
495
+ font-size: 1.2rem;
496
+ font-weight: 600;
497
+ color: var(--ink);
498
+ margin: 0 0 6px;
499
+ line-height: 1.3;
500
+ }
501
+ .ranked-item .rank-meta {
502
+ display: flex;
503
+ align-items: center;
504
+ gap: 8px;
505
+ flex-wrap: wrap;
506
+ margin-bottom: 14px;
507
+ }
508
+ .ranked-item .rank-body > p {
509
+ color: var(--ink-soft);
510
+ font-size: 0.95rem;
511
+ line-height: 1.65;
512
+ margin: 0 0 0.85em;
513
+ }
514
+ .ranked-item .rank-body > p:last-child { margin-bottom: 0; }
515
+ .ranked-item .rank-body > ul,
516
+ .ranked-item .rank-body > ol {
517
+ color: var(--ink-soft);
518
+ font-size: 0.95rem;
519
+ line-height: 1.65;
520
+ margin: 0 0 0.85em;
521
+ padding-left: 1.2em;
522
+ }
523
+ .ranked-item .rank-aside {
524
+ color: var(--muted);
525
+ font-size: 0.9rem;
526
+ line-height: 1.6;
527
+ padding-left: 14px;
528
+ border-left: 2px solid var(--rule);
529
+ margin: 0;
530
+ }
531
+ .ranked-item .rank-aside-label {
532
+ font-family: var(--mono);
533
+ font-size: 0.7rem;
534
+ font-weight: 600;
535
+ letter-spacing: 0.1em;
536
+ text-transform: uppercase;
537
+ color: var(--accent);
538
+ margin-right: 6px;
539
+ }
459
540
 
460
541
  /* byline */
461
542
  .byline {