Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
06a98e2
reorganise pages
DeveloperAlly Jan 8, 2026
d594c9b
Add comprehensive on-chain dual gateway test section
DeveloperAlly Jan 8, 2026
8adba37
Pretty good. Maybe a quick monitor section. Then clean up and ship
DeveloperAlly Jan 8, 2026
04a3bf3
Ready for review
DeveloperAlly Jan 8, 2026
f0d82ed
Format Docker Quickstart
DeveloperAlly Jan 8, 2026
db6df1f
set up layouts
DeveloperAlly Jan 8, 2026
a8c787b
style
DeveloperAlly Jan 8, 2026
4794df3
code samples
DeveloperAlly Jan 10, 2026
a027618
fix styles.css error
DeveloperAlly Jan 10, 2026
1a02925
fix IA
DeveloperAlly Jan 10, 2026
77ac754
adding readme's to repo on docs features, updating layouts, correctin…
DeveloperAlly Jan 10, 2026
47b2229
change US language flag to uk language flag
DeveloperAlly Jan 10, 2026
47f9d2f
Docs v2 cursor (#737)
DeveloperAlly Jan 12, 2026
90dced9
Fixing links, pages, seo, layout, IA for public view
DeveloperAlly Jan 12, 2026
ebe131f
checkpoint commit
DeveloperAlly Jan 12, 2026
4964c2c
Add automatic SEO generation script to create keywords for all mdx fi…
DeveloperAlly Jan 12, 2026
c9fc104
update docs.json paths
DeveloperAlly Jan 12, 2026
06312be
Adding AI safety guards to repo
DeveloperAlly Jan 12, 2026
626f68f
Fix frontmatter parsing error
DeveloperAlly Jan 12, 2026
3a7f4df
revert agent changes to frontmatter
DeveloperAlly Jan 12, 2026
71b6362
new script
DeveloperAlly Jan 12, 2026
2a31ffb
Adding Callout to pages under construction still
DeveloperAlly Jan 12, 2026
ed3bd4c
change og:image
DeveloperAlly Jan 12, 2026
85744bf
add new og image
DeveloperAlly Jan 12, 2026
7840c9c
Fix og links
DeveloperAlly Jan 13, 2026
3cd2e72
re-style home page
DeveloperAlly Jan 13, 2026
b04ad87
tweak
DeveloperAlly Jan 13, 2026
9b10b13
update protocol and token tab IA
DeveloperAlly Jan 13, 2026
c25c894
update portal
DeveloperAlly Jan 13, 2026
7c699b2
update developer landing
DeveloperAlly Jan 13, 2026
65e308a
home page tweaks
DeveloperAlly Jan 13, 2026
47dd95a
frame mode many frustrating
DeveloperAlly Jan 14, 2026
005a9b8
backup hero style before AI ruins it... ;p
DeveloperAlly Jan 14, 2026
c9e8e61
backup hero style before AI ruins it... ;p
DeveloperAlly Jan 14, 2026
51ae706
Frame styled
DeveloperAlly Jan 14, 2026
6a8e561
separating Portal Components for reuse
DeveloperAlly Jan 15, 2026
acb9b70
fix theme mode colours in frame mode
DeveloperAlly Jan 16, 2026
da22fdf
fix mode
DeveloperAlly Jan 16, 2026
ad50f6e
theme aware icons
DeveloperAlly Jan 16, 2026
8337adb
Merge theme-aware icons and starfield updates from agent/theme-migration
DeveloperAlly Jan 16, 2026
e6c383f
theme aware
DeveloperAlly Jan 16, 2026
5fd8a00
style changes
DeveloperAlly Jan 16, 2026
7fa0f2d
centred
DeveloperAlly Jan 16, 2026
aeddeb7
finish styles for portals
DeveloperAlly Jan 16, 2026
4f619ea
move elements
DeveloperAlly Jan 16, 2026
08c977e
update products, portal pages
DeveloperAlly Jan 16, 2026
5eb96e0
mission control
DeveloperAlly Jan 17, 2026
f179636
products
DeveloperAlly Jan 17, 2026
ac14cbc
finished portals
DeveloperAlly Jan 17, 2026
0ca2506
read home image from github not project
DeveloperAlly Jan 17, 2026
7fd07ea
home pages
DeveloperAlly Jan 18, 2026
c1e6e7c
add images, finish story
DeveloperAlly Jan 18, 2026
c0ef6f7
style updates
DeveloperAlly Jan 18, 2026
53a0e5f
clean up
DeveloperAlly Jan 18, 2026
e2e387e
small title change
DeveloperAlly Jan 18, 2026
e4e18b4
clean up duplicate assets
DeveloperAlly Jan 18, 2026
d1af4f0
tweaks on Home Pages, adding content
DeveloperAlly Jan 18, 2026
8234de5
home tab ok to ship to preview
DeveloperAlly Jan 18, 2026
3a4eaec
change n8n fetches to github actions
DeveloperAlly Jan 19, 2026
91c35b4
add github workflows
DeveloperAlly Jan 19, 2026
373b524
update gh secret name
DeveloperAlly Jan 19, 2026
03f1e44
Update forum data - 2026-01-19T03:30:43.015-05:00
DeveloperAlly Jan 19, 2026
8bfc8d2
Update Blog Data 2026-01-19T03:35:53.410-05:00
DeveloperAlly Jan 19, 2026
fc6330a
blog workflow
DeveloperAlly Jan 19, 2026
348991f
add youtube ingest
DeveloperAlly Jan 19, 2026
3bc88ba
remove secret
DeveloperAlly Jan 19, 2026
c4fd763
remove from git
DeveloperAlly Jan 19, 2026
fbbb1c2
Update Livepeer YouTube videos - 2026-01-19T11:18:24.988Z
DeveloperAlly Jan 19, 2026
92ab39f
Update Livepeer YouTube videos - 2026-01-19T11:24:35.317Z
DeveloperAlly Jan 19, 2026
44cb743
Update Livepeer YouTube videos - 2026-01-19T11:40:42.960Z
DeveloperAlly Jan 19, 2026
d4d4087
youtube ingest
DeveloperAlly Jan 20, 2026
3e25953
manual pull
DeveloperAlly Jan 20, 2026
8449d34
finalise trending page
DeveloperAlly Jan 20, 2026
637bc09
remove tests
DeveloperAlly Jan 20, 2026
7674c70
Update forum data - 2026-01-20T14:00:14.116-05:00
DeveloperAlly Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 0 additions & 56 deletions .AI-SAFEGUARDS.md

This file was deleted.

16 changes: 0 additions & 16 deletions .ai-audit.sh

This file was deleted.

17 changes: 17 additions & 0 deletions .augment/.augment-guidelines
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Standard Operating Procedure for Scripts

<!-- ## 1. Documentation & Testing Requirements
- Whenever creating or modifying a script, you MUST:
- Generate documentation in the `/docs` folder (x folder).
- Generate comprehensive tests in the `/tests` folder (y folder).
- Use the naming convention `[script_name].test.js` (or applicable extension). -->

## 1. Safety & Verification Workflow

- Before applying changes to existing files, you MUST:
1. Create a "checkpoint" backup using the internal checkpoint tool.
2. Create a new git branch named `agent/[feature-name]`.
3. Verify the script's logic by applying it to a temporary copy of the target
file first.
4. Only after verification and user approval, apply the changes to the project
files in the new branch.
5 changes: 5 additions & 0 deletions .augment/rules/git-safety.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GIT WRITE PROTOCOL
- **ENFORCEMENT:** You MUST verify the existence of local Git hooks in `.git/hooks/` before initiating any write command (commit, push, rebase).
- **FORBIDDEN:** You are STRICTLY FORBIDDEN from using `--no-verify` or `-n`.
- **BEHAVIOR:** When a write command is initiated, you MUST announce: "Initiating [action]. Please approve the safety checkpoint in your terminal."
- **RECOVERY:** If a command fails, suggest restoring from the latest `checkpoint/` branch.
39 changes: 39 additions & 0 deletions .github/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 🤖 PROJECT AGENT RULES & SAFETY PROTOCOLS

## 🛠️ CRITICAL BOUNDARIES (READ FIRST)

- **ALWAYS** check for the existence of local Git hooks in `.git/hooks/` before
initiating a write command.
- **NEVER** use `--no-verify` or `-n` flags to bypass safety checks. These are
hard project constraints.
- **NEVER** perform a `git reset --hard` or `git push --force` without an
explicit, multi-turn plan confirmed by the user.
- **NEVER** perform a `git reset --hard` or `git push --force` without a saved
branch to revert to in case of failure.

## 📦 GIT WORKFLOW & CHECKPOINTS

This project enforces a "Human-in-the-Loop" (HitL) verification for all
destructive or history-altering actions.

- **Automatic Checkpoints:** Every `commit`, `push`, and `rebase` triggers a
safety hook that creates a branch named `checkpoint/YYYY-MM-DD_HHMMSS`.
- **Pre-Write Announcement:** Before executing a write command, you MUST state:
_"I am initiating [COMMAND]. A safety checkpoint will be created. Please
switch to your terminal to type 'yes' when prompted."_
- **Recovery:** If a command fails, the latest pre-failure state is stored in
the most recent `checkpoint/` branch.

## 🧪 VALIDATION COMMANDS

Before asking for a commit, you should ideally run these to ensure code quality:

```bash
# Verify build
mint dev
```

# Run local test suite

Make a test for mintlify in the v2/tests file. DO NOT EVER run a script without
testing it on a local branch first.
14 changes: 7 additions & 7 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ containerized with Docker.
- Use `.tsx` for new components; `.jsx` is legacy but supported.
- **Automations & Scripts:**
- All dynamic, AI, and data-fetching logic in `automations/` and `ai-tools/`.
- Scripts for API doc generation and external data in `v2/scripts/` (see
- Scripts for API doc generation and external data in `snippets/scripts/` (see
generate-api-docs.sh, fetch-openapi-specs.sh).
- **API Reference:**
- OpenAPI spec in `openapi.yaml` (AI API: see ai/worker/api/openapi.yaml). Use
Expand All @@ -32,10 +32,10 @@ containerized with Docker.
`docker buildx build --platform linux/amd64 --load -t livepeer/docs .`
- Makefile: `make all`
- **API Docs Generation:**
- Use `v2/scripts/generate-api-docs.sh` to convert OpenAPI specs to MDX/API
docs and navigation JSON. Example:
- Use `snippets/scripts/generate-api-docs.sh` to convert OpenAPI specs to
MDX/API docs and navigation JSON. Example:
```bash
./v2/scripts/generate-api-docs.sh ai/worker/api/openapi.yaml v2/pages/04_gateways/guides-references/api-reference/AI-API "AI API"
./snippets/scripts/generate-api-docs.sh ai/worker/api/openapi.yaml v2/pages/04_gateways/guides-references/api-reference/AI-API "AI API"
```
- Output: MDX files + navigation snippet for `docs.json`.
- **External Data Fetching:**
Expand Down Expand Up @@ -72,8 +72,8 @@ containerized with Docker.
- **OpenAPI:** API docs generated from `openapi.yaml` (see also
`ai/worker/api/openapi.yaml`).
- **Docker:** Containerized builds for CI/CD and local dev.
- **Automations:** Scripts in `v2/scripts/` automate API doc generation and
external data sync.
- **Automations:** Scripts in `snippets/scripts/` automate API doc generation
and external data sync.

## Key Files & Directories

Expand All @@ -83,7 +83,7 @@ containerized with Docker.
- `openapi.yaml`, `ai/worker/api/openapi.yaml` — API reference
- `Dockerfile`, `Makefile` — Build/deploy
- `README.md`, `README_V2.md` — Developer notes, protocol/architecture
- `v2/scripts/` — Automation scripts (API docs, data fetching)
- `snippets/scripts/` — Automation scripts (API docs, data fetching)

---

Expand Down
198 changes: 198 additions & 0 deletions .github/scripts/fetch-forum-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
const https = require("https");
const fs = require("fs");

// Fetch JSON from URL
function fetchJSON(url) {
return new Promise((resolve, reject) => {
https
.get(url, (res) => {
let data = "";
res.on("data", (chunk) => {
data += chunk;
});
res.on("end", () => {
try {
resolve(JSON.parse(data));
} catch (e) {
reject(e);
}
});
})
.on("error", reject);
});
}

// Check if topic is old pinned
function isOldPinned(topic) {
const pinned = topic.pinned === true || topic.pinned_globally === true;
if (!pinned) return false;
const created = new Date(topic.created_at);
const now = new Date();
const ageDays = (now - created) / (1000 * 60 * 60 * 24);
return ageDays > 30;
}

// Clean and format HTML
function cleanAndFormatHTML(html) {
let cleanHTML = html;

// Remove anchor navigation links
cleanHTML = cleanHTML.replace(
/<a[^>]*name="[^"]*"[^>]*class="anchor"[^>]*>.*?<\/a>/g,
""
);

// Clean up headings
cleanHTML = cleanHTML.replace(/<h1[^>]*>(.*?)<\/h1>/g, "<h3>$1</h3>");
cleanHTML = cleanHTML.replace(/<h2[^>]*>(.*?)<\/h2>/g, "<h4>$1</h4>");
cleanHTML = cleanHTML.replace(/<h3[^>]*>(.*?)<\/h3>/g, "<h5>$1</h5>");
cleanHTML = cleanHTML.replace(/<h[4-6][^>]*>(.*?)<\/h[4-6]>/g, "<h6>$1</h6>");

// Clean up images and their references
cleanHTML = cleanHTML.replace(/<a[^>]*class="lightbox"[^>]*>.*?<\/a>/g, "");
cleanHTML = cleanHTML.replace(
/<div[^>]*class="lightbox-wrapper"[^>]*>.*?<\/div>/g,
""
);
cleanHTML = cleanHTML.replace(/<img[^>]*>/g, "");
cleanHTML = cleanHTML.replace(/\[!\[.*?\]\(.*?\)\]\(.*?\)/g, "");
cleanHTML = cleanHTML.replace(/image\d+×\d+\s+[\d.]+\s*[KM]B/gi, "");

// Keep paragraphs, lists, emphasis, code
cleanHTML = cleanHTML.replace(/<p>/g, "<p>");
cleanHTML = cleanHTML.replace(/<\/p>/g, "</p>");
cleanHTML = cleanHTML.replace(/<ul>/g, "<ul>");
cleanHTML = cleanHTML.replace(/<\/ul>/g, "</ul>");
cleanHTML = cleanHTML.replace(/<ol>/g, "<ol>");
cleanHTML = cleanHTML.replace(/<\/ol>/g, "</ol>");
cleanHTML = cleanHTML.replace(/<li>/g, "<li>");
cleanHTML = cleanHTML.replace(/<\/li>/g, "</li>");
cleanHTML = cleanHTML.replace(
/<strong>(.*?)<\/strong>/g,
"<strong>$1</strong>"
);
cleanHTML = cleanHTML.replace(/<em>(.*?)<\/em>/g, "<em>$1</em>");
cleanHTML = cleanHTML.replace(/<code>(.*?)<\/code>/g, "<code>$1</code>");

// Simplify links
cleanHTML = cleanHTML.replace(
/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/g,
'<a href="$1" target="_blank">$2</a>'
);

// Decode HTML entities
cleanHTML = cleanHTML.replace(/&amp;/g, "&");
cleanHTML = cleanHTML.replace(/&lt;/g, "<");
cleanHTML = cleanHTML.replace(/&gt;/g, ">");
cleanHTML = cleanHTML.replace(/&quot;/g, '"');
cleanHTML = cleanHTML.replace(/&#39;/g, "'");
cleanHTML = cleanHTML.replace(/&nbsp;/g, " ");

// Clean up whitespace
cleanHTML = cleanHTML.replace(/\s+/g, " ");
cleanHTML = cleanHTML.replace(/<p>\s*<\/p>/g, "");

return cleanHTML.trim();
}

async function main() {
console.log("Fetching latest topics...");
const latestData = await fetchJSON("https://forum.livepeer.org/latest.json");

const topics = latestData.topic_list?.topics || [];
console.log(`Found ${topics.length} topics`);

// Filter out old pinned topics
const filteredTopics = topics.filter((t) => !isOldPinned(t));
console.log(`After filtering: ${filteredTopics.length} topics`);

// Get top 4
const top4 = filteredTopics.slice(0, 4);
console.log(`Processing top 4 topics...`);

const processedTopics = [];

for (const topic of top4) {
console.log(`Processing topic ${topic.id}: ${topic.title}`);

// Fetch full topic data
const topicData = await fetchJSON(
`https://forum.livepeer.org/t/${topic.id}.json`
);

// Extract first post
const firstPost = topicData.post_stream?.posts?.find(
(p) => p.post_number === 1
);

if (!firstPost) {
console.log(` No first post found, skipping`);
continue;
}

const htmlContent = cleanAndFormatHTML(firstPost.cooked || "");
const datePosted = topic.created_at
? new Date(topic.created_at).toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
})
: "";

processedTopics.push({
title: topic.title,
href: `https://forum.livepeer.org/t/${topic.id}`,
author: `By ${firstPost.name || firstPost.username || "Unknown"} (@${
firstPost.username || "unknown"
})`,
content: htmlContent,
replyCount: (topic.posts_count || 1) - 1,
datePosted: datePosted,
});
}

console.log(`Processed ${processedTopics.length} topics`);

// Generate JavaScript export with exact formatting
let jsExport = "export const forumData = [\n";

processedTopics.forEach((item, index) => {
jsExport += " {\n";
jsExport += ` title: "${item.title
.replace(/\\/g, "\\\\")
.replace(/"/g, '\\"')}",\n`;
jsExport += ` href: "${item.href}",\n`;
jsExport += ` author: "${item.author
.replace(/\\/g, "\\\\")
.replace(/"/g, '\\"')}",\n`;

// Content with proper escaping and indentation
const escapedContent = item.content
.replace(/\\/g, "\\\\")
.replace(/"/g, '\\"')
.replace(/\n/g, " ");

jsExport += ` content:\n "${escapedContent}",\n`;
jsExport += ` replyCount: ${item.replyCount},\n`;
jsExport += ` datePosted: "${item.datePosted}",\n`;
jsExport += " }";

if (index < processedTopics.length - 1) {
jsExport += ",";
}
jsExport += "\n";
});

jsExport += "];\n";

// Write to file
const outputPath = "snippets/automations/forum/forumData.jsx";
fs.mkdirSync("snippets/automations/forum", { recursive: true });
fs.writeFileSync(outputPath, jsExport);
console.log(`Written to ${outputPath}`);
}

main().catch((err) => {
console.error("Error:", err);
process.exit(1);
});
Loading