mirror of
https://github.com/hanzoai/ci.git
synced 2026-11-23 17:36:44 +00:00
agent/main.ts (strict TypeScript, Node 22.18+ type stripping, turndown) edits a built bundle in place before it publishes: a Markdown twin of every public page (/ -> /index.md, /a/b -> /a/b.md), the <link rel="alternate" type="text/markdown"> naming it before </head>, robots.txt (canonical, or the Content-Signal and Sitemap lines a site's own lacks), sitemap.xml, llms.txt (or the /auth.md line a site's own lacks), /.well-known/api-catalog and /auth.md, each only where the site wrote none of its own; --skills writes the agent-skills index. Each piece has a --no-<piece> opt-out. agent/sweep.ts fetches every URL a live site's sitemap.xml, llms.txt and --from files name as ClaudeBot, Meta-ExternalAgent and Googlebot, six at a time. The site action takes `agent: <host>` (or `slug=host` lines with sites:); hanzo.yml takes site.agent and sites[].agent. Both reach the tool through bin/agent. A site that names none ships as built. Testing: agent/ typechecks strict and passes node --test on Node 24 and 22.23.3 (35 tests: three fixture bundles to golden output byte for byte, idempotent second runs, a hardlinked bundle left alone, the worker pool equal to one thread, a sweep against a local server). bin/agent_test.sh, bin/sites_test.sh and every other hanzo.yml step pass locally except gocache, which fails the same on origin/main in a worktree. Over 249 live docs.hanzo.ai pages every page changed by the one <link> and nothing else. Risk: high (workflow and action). The action step and the build.yml call run only when agent: is set; build.yml's tool list now requires bin/agent, which every tree from this commit on carries. How to revert: git revert this commit; callers drop agent: or pin the previous tag.
20 lines
461 B
JSON
20 lines
461 B
JSON
{
|
|
"name": "@hanzo/agent-ready",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": { "node": ">=22.18" },
|
|
"scripts": {
|
|
"check": "tsc -p .",
|
|
"test": "node --test --experimental-strip-types --disable-warning=ExperimentalWarning test/*.test.ts"
|
|
},
|
|
"dependencies": {
|
|
"@mixmark-io/domino": "2.2.0",
|
|
"turndown": "7.2.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "22.20.5",
|
|
"@types/turndown": "5.0.6",
|
|
"typescript": "5.9.3"
|
|
}
|
|
}
|