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
31 changes: 25 additions & 6 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,29 @@ article.prose {
margin: 2.5rem 0;
}

/* Anchored headings: hover reveals a link affordance. */
.prose h2:hover::after,
.prose h3:hover::after {
content: " #";
color: var(--ink-faint);
font-weight: 400;
/* Anchored headings: a clickable link icon (seal-red) that links to the section.
Hidden until the heading is hovered or the icon is keyboard-focused, so a
reader can grab a shareable URL without the icon cluttering the heading. */
/* The inline wrapper is the hover target — sized to the text + icon only, so the
icon does NOT stay visible when the cursor is elsewhere along the heading's
full-width line. */
.prose .heading-inner {
position: relative;
}
.prose .heading-anchor {
display: inline-flex;
align-items: center;
margin-left: 0.35em;
color: var(--seal);
border-bottom: none; /* override the .prose a underline */
opacity: 0;
transition: opacity 130ms ease, color 120ms ease;
vertical-align: middle;
}
.prose .heading-inner:hover .heading-anchor,
.prose .heading-anchor:focus-visible {
opacity: 1;
}
.prose .heading-anchor:hover {
color: var(--seal-deep);
}
27 changes: 27 additions & 0 deletions components/markdoc/HeadingAnchor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* The clickable section anchor appended to every heading. Renders a link icon
* (not a literal `#`) that appears on heading hover/keyboard-focus and links to
* `#<id>`, so a reader can grab a shareable URL to the exact section. Visibility
* and color live in `.heading-anchor` (app/globals.css).
*/
export function HeadingAnchor({ id }: { id: string }) {
return (
<a href={`#${id}`} className="heading-anchor" aria-label="Link to this section">
<svg
width="15"
height="15"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<path d="M9 17H7A5 5 0 0 1 7 7h2" />
<path d="M15 7h2a5 5 0 1 1 0 10h-2" />
<line x1="8" x2="16" y1="12" y2="12" />
</svg>
</a>
)
}
18 changes: 18 additions & 0 deletions content/docs/mcp/guides/publish-receipts.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ https://your.host/agent/audit.json ← the manifest naming the verify inputs
- `root` — the root identity of the registry (the identity tooling prints it; it is
the anchor the agent's delegation chains to).

## One command: `export-spend-bundle`

The whole publish step is a single gateway command — it flattens the (rotated)
spend log into one `spend.jsonl`, writes the `audit.json` manifest, and commits
the registry working files in the same motion:

```bash
auths-mcp export-spend-bundle \
--live-dir "$AUTHS_MCP_LIVE_DIR" \
--agent "<the agent identifier from your spend-log directory>" \
--root "<the root identity your registry prints>" \
--registry-url "https://github.com/you/agent-registry" \
--out ./publish
```

Serve `./publish` from any static host and you are done. The sections below
describe what the command produces, and remain the manual path if you need it.

## Commit the working files — or the audit fails

The registry's identity history lives in git refs, but the **durable budget counter
Expand Down
6 changes: 3 additions & 3 deletions content/docs/mcp/providers/x402.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ Use testnet mode to prove the cap refuses the over-cap call before you ever poin

## Useful links

- Testnet USDC faucet (select Base Sepolia): https://faucet.circle.com/
- MetaMask: https://metamask.io/
- x402 wallet reference: https://github.com/0xKoda/x402-wallet/blob/main/wallet.md
- [Testnet USDC faucet](https://faucet.circle.com/) — select **Base Sepolia** as the network
- [MetaMask](https://metamask.io/)
- [x402 wallet reference](https://github.com/0xKoda/x402-wallet/blob/main/wallet.md)
2 changes: 2 additions & 0 deletions lib/markdoc-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Card, CardGroup } from '@/components/markdoc/Cards'
import { Steps, Step } from '@/components/markdoc/Steps'
import { CodeTabs, CodeTab } from '@/components/markdoc/CodeTabs'
import { VerdictChip } from '@/components/markdoc/VerdictChip'
import { HeadingAnchor } from '@/components/markdoc/HeadingAnchor'

/** The single map from Markdoc tag names to React components. */
const components = {
Expand All @@ -18,6 +19,7 @@ const components = {
CodeTabs,
CodeTab,
VerdictChip,
HeadingAnchor,
}

/** Renders a transformed Markdoc tree to React — no HTML strings, ever. */
Expand Down
12 changes: 11 additions & 1 deletion markdoc/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ export function buildConfig(): Config {
const attributes = node.transformAttributes(config)
const children = node.transformChildren(config)
const id = attributes.id ?? slugger.slug(headingText(node))
return new Tag(`h${node.attributes.level}`, { ...attributes, id }, children)
// A clickable link-icon anchor (shown on hover via .heading-anchor
// CSS) so a reader can grab a shareable link to the exact section.
const anchor = new Tag('HeadingAnchor', { id }, [])
// Wrap the text + anchor in an inline span so the hover trigger is the
// text/icon only — NOT the full-width heading block, which would keep
// the icon visible anywhere along the heading's horizontal line.
const inner = new Tag('span', { className: 'heading-inner' }, [
...children,
anchor,
])
return new Tag(`h${node.attributes.level}`, { ...attributes, id }, [inner])
},
},
fence: {
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading