Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions crates/shell/resources/glance/fixtures/news-digest-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"run_id": "glance",
"app_id": "os.news",
"template": {
"id": "news-digest",
"version": "1.1.0",
"digest": "92ab809c79d8b83c370efeb37b9a7c6de632d313c45456fd1e91e45c43261f02"
},
"status": "ready",
"data": {
"digest": {
"language": "en",
"points": [
{
"citations": [
"s72ee00603e06"
],
"text": "Harbor City's council approved an order for 120 electric buses on Tuesday."
},
{
"citations": [
"s39327104dbcc"
],
"text": "Ocho bibliotecas de Puerto Claro abrirán los domingos durante un programa piloto de tres meses."
},
{
"citations": [
"s3820b1dec583"
],
"text": "Clearwater Utilities reported that a six-month sensor pilot detected 43 underground leaks across two districts."
}
],
"summary": "Sources: Harbor City approves electric bus order; Ocho bibliotecas amplían su horario durante un piloto; Water utility reports early leak-detection results",
"task": "digest"
},
"language": "en",
"missing": 0,
"sources": [
{
"evidence_sha256": "d7006e8135e503bb16aedc89b4f5e6848da09c42d82097795a84fcbc609d8ba8",
"id": "s72ee00603e06",
"published_at": "2026-09-19T10:00:00Z",
"source": "Harbor Daily",
"title": "Harbor City approves electric bus order",
"url": "https://example.invalid/news/buses"
},
{
"evidence_sha256": "fb9bd23cf16648691f79ed6f64b5add1fb35506cf838dac8785f428be7c102bd",
"id": "s39327104dbcc",
"published_at": "2026-09-19T08:30:00Z",
"source": "Diario de Puerto Claro",
"title": "Ocho bibliotecas amplían su horario durante un piloto",
"url": "https://example.invalid/news/libraries"
},
{
"evidence_sha256": "1464f7fa5fe6edd95282a0f93cd0a62d0ad8cfcfb6d9271303d79bc3e0b6c2b1",
"id": "s3820b1dec583",
"published_at": "2026-09-18T16:00:00Z",
"source": "Clearwater Courier",
"title": "Water utility reports early leak-detection results",
"url": "https://example.invalid/news/water"
}
],
"topic": "city infrastructure",
"unreadable": 0
},
"provenance": [
{
"id": "s72ee00603e06",
"url": "https://example.invalid/news/buses",
"title": "Harbor City approves electric bus order",
"source": "Harbor Daily",
"language": "en",
"published_at": "2026-09-19T10:00:00Z",
"retrieved_at": "2026-09-20T08:00:01Z",
"evidence_sha256": "d7006e8135e503bb16aedc89b4f5e6848da09c42d82097795a84fcbc609d8ba8",
"via": "article"
},
{
"id": "s39327104dbcc",
"url": "https://example.invalid/news/libraries",
"title": "Ocho bibliotecas amplían su horario durante un piloto",
"source": "Diario de Puerto Claro",
"language": "en",
"published_at": "2026-09-19T08:30:00Z",
"retrieved_at": "2026-09-20T08:00:02Z",
"evidence_sha256": "fb9bd23cf16648691f79ed6f64b5add1fb35506cf838dac8785f428be7c102bd",
"via": "article"
},
{
"id": "s3820b1dec583",
"url": "https://example.invalid/news/water",
"title": "Water utility reports early leak-detection results",
"source": "Clearwater Courier",
"language": "en",
"published_at": "2026-09-18T16:00:00Z",
"retrieved_at": "2026-09-20T08:00:03Z",
"evidence_sha256": "1464f7fa5fe6edd95282a0f93cd0a62d0ad8cfcfb6d9271303d79bc3e0b6c2b1",
"via": "article"
}
],
"diagnostics": [],
"stats": {
"calls": 7,
"model_calls": 1,
"pages": 3,
"search_fetches": 2,
"denied": 0,
"failed": 0,
"peak_concurrency": 3,
"elapsed_ms": 412.0
},
"trace": [
{
"event": "start",
"call": 0,
"tool": "research.search",
"ms": 0.0
}
],
"started_at": "2026-09-20T08:00:00Z",
"result_path": "toolbox/runs/news-digest/glance.json"
}
47 changes: 47 additions & 0 deletions crates/shell/resources/glance/news-brief.card
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ledger news.brief@1.0.0
# level: L0
# profile: ui/l0
#
# The News digest card on the glance screen (ADR 0002 M4). The card carries
# no finding of its own: the summary, the points, their citations and every
# source come from `sys.digest`, which the shell resolves from the digest it
# holds for the publishing app (glance_digest.rs). News's agent runs the
# `news-digest` workflow with the run id `glance`, so each run replaces the
# digest this card binds, and republishes the card.

source brief sys.digest(app: "os.news", id: "glance",
fields: [topic, summary, points, sources,
id, text, cite, n, title, source])

copy label { class: vocabulary, en: "NEWS DIGEST", zh: "新闻摘要" }
copy nothing { class: vocabulary, en: "No digest yet. News will brief you after its next read.", zh: "暂无摘要。新闻读完下一批后会为你汇总。" }
copy sources { class: vocabulary, en: "SOURCES", zh: "来源" }

view root Surface(pad: .page) {
Col(gap: 6) {
Row(gap: 8) {
TextCaption(text: copy.label, width: .fill)
TextCaption(text: brief.topic)
}
when brief.$state == .failed { TextBody(text: copy.nothing, width: .fill) }
when brief.$state == .ready {
Col(gap: 6) {
TextBody(text: brief.summary, width: .fill)
for p in brief.points key p.id {
Row(gap: 8) {
TextRow(text: p.text, width: .fill)
TextCaption(text: p.cite)
}
}
TextCaption(text: copy.sources)
for s in brief.sources key s.id {
Row(gap: 8) {
TextCaption(text: s.n)
TextCaption(text: s.source)
TextCaption(text: s.title, width: .fill)
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions crates/shell/resources/glance/news-digest.card
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# The News digest on the glance screen (OctoSense #63): a test fixture the
# shell publishes as `os.news` under OCTOSENSE_GLANCE_DEMO=1. Every value is
# a source the publisher supplies in `data`; the card states nothing else.
# The sources are the catalogued News digest helpers; the `sys.digest(app:)`
# source ADR 0002 names is not in the pinned L0 catalog yet.
# The sources are the catalogued News digest helpers, fed by the publisher;
# news-brief.card is the same card bound to a host-held `sys.digest`.

source status sys.news_status(fields: [message, count])
source stories sys.news_digest(count: 3, fields: [id, title, publisher])
Expand Down
Loading
Loading