Repository navigation
L0: add sys.digest, a host-resolved digest source - #40
Merged
Merged
Conversation
An app's agent findings become a source the host resolves, with provenance,
instead of text the card carries (OctoSense ADR 0002 section 7).
- Catalog: `sys.digest(app, id, fields)`, answering one template-independent
record: status, topic, language, summary, retrieved_at, count, points
({id, text, label, cite, citations}) and sources ({id, n, title, source,
url, published_at}). Row fields are pooled with the record's, as a
forecast's days are.
- Checker: `app` is required and must be a literal app id (the host compares
it with the publisher); `id` is required, a literal in the run-id charset
[A-Za-z0-9_-]{1,64} or a path into state.
- Host-answered only: vm_call has no lowering, and the translation test
checks that it never gains one.
- Read-only (not in MUTABLE).
- Docs: profile section 5.14 and the TOML entry; tests and a fixture card.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
sys.digest(app:, id:, fields:)to the L0 source catalog. It's the host-resolved source that OctoSense ADR 0002 §7 ("Cards", item 1) and milestone M4 describe. With it, a glance card binds to a digest the host holds for its own app, with provenance, and doesn't carry the findings as text.What changes
catalog::SOURCES,ANSWERS,docs/ui-l0-constructors.toml): argsapp,id,fields. It returns one record whose shape doesn't depend on the template that produced the digest:status:ready,partial,failed,missingorexpiredtopic,language,summary,retrieved_at,countpoints: rows{id, text, label, cite, citations}.citationsare indexes intosources, andciteis the same list as 1-based text.sources: rows{id, n, title, source, url, published_at}fields:, the same waysys.weather's days are.appis required and must be a literal app id. The host compares it with the publishing app, which is the caller and never an argument, so a card can't compute it.idis required. It can be a literal in the run-id charset[A-Za-z0-9_-]{1,64}(so it can't be a path to a file) or a path into state.makepad::vm_callreturnsNone.every_offered_field_has_a_translationnow has aHOST_ONLYlist and asserts that such a capability never gains a lowering.MUTABLE.sources, and that a missing or expired digest resolves to an empty record with$state.failed.The OctoSense glance service implements the resolver, together with retention, expiry and size caps, in a follow-up draft PR that pins this branch.
Tests
cargo test -p octoscript-ui-l0passes. Newtests/digest.rsand fixturedigest.cardcover admission, the source plan, realization with a ready digest and a missing one, the argument rules (required, literal app, no traversal, id from state), read-only status, and that there's no backend call.cargo clippy -p octoscript-ui-l0 --all-targets --all-features -- -D warningsandcargo fmt --checkare clean.🤖 Generated with Claude Code