Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions .changeset/multi-backend-caplet-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@caplets/core": minor
---

Add multi-backend Markdown Caplet files that expand plural backend maps into parent-scoped runtime child handles.
6 changes: 6 additions & 0 deletions CONCEPTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ A Caplet that is ready to live in the Prebuilt Caplets Catalog.

Catalog-Grade Caplets include enough frontmatter, setup or verification guidance, auth handling, least-privilege scope notes, safety notes, Code Mode workflow guidance, and local/project/runtime metadata for agents to use them without rediscovering private assumptions from the author's environment.

### Multi-Backend Caplet File

A Markdown Caplet file that describes one provider-scale capability while declaring multiple child backend entries in frontmatter.

Multi-Backend Caplet Files are for suites such as Google Workspace where one catalog card, install unit, setup flow, auth story, and operating guide should expand into several stable runtime child Caplets. They compile into the existing backend maps rather than introducing a new runtime backend kind.

### Catalog Presentation Metadata

Optional Caplet frontmatter that improves how a Caplet appears in public catalog surfaces without changing runtime behavior, trust, safety status, ranking, or install readiness.
Expand Down
723 changes: 723 additions & 0 deletions apps/catalog/src/data/official-catalog.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion apps/catalog/src/scripts/virtual-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function initVirtualCatalogSearch(
let lastFocusedControl: HTMLElement | null = null;
let searchTelemetryTimer: number | undefined;
let lastSearchTelemetrySignature = "";
let destroyed = false;
const renderedRows = new Map<string, HTMLElement>();
const virtualizer = new Virtualizer<Window, HTMLElement>({
count: visibleRows.length,
Expand All @@ -69,7 +70,9 @@ export function initVirtualCatalogSearch(
observeElementRect: observeWindowRect,
observeElementOffset: observeWindowOffset,
getItemKey: (index) => visibleRows[index]?.id ?? index,
onChange: () => renderVirtualRows(),
onChange: () => {
if (!destroyed) renderVirtualRows();
},
});
const cleanupVirtualizer = virtualizer._didMount();
virtualizer._willUpdate();
Expand Down Expand Up @@ -168,6 +171,7 @@ export function initVirtualCatalogSearch(
}

function renderVirtualRows(): void {
if (destroyed) return;
const items = virtualizer.getVirtualItems();
resultSpacerEl.style.height = `${Math.max(virtualizer.getTotalSize(), visibleRows.length ? estimateRowHeight() : 1)}px`;
const nextKeys = new Set<string>();
Expand Down Expand Up @@ -288,6 +292,7 @@ export function initVirtualCatalogSearch(
return {
applySearch,
destroy() {
destroyed = true;
if (searchTelemetryTimer) window.clearTimeout(searchTelemetryTimer);
events.abort();
cleanupVirtualizer();
Expand Down
254 changes: 221 additions & 33 deletions apps/docs/src/content/docs/reference/caplet-files.mdx

Large diffs are not rendered by default.

Loading