2 Commits

Author SHA1 Message Date
Ryan 16aadbf0bf Allow sync-agent-skills.mjs to match Windows line ends (#5477)
# Description of Changes

The readFrontmatter regex in `docs/scripts/sync-agent-skills.mjs` uses
`\n` to match line endings, which fails on Windows where files have CRLF
(`\r\n`) endings. This causes `pnpm run build` to fail with:
```
Error: skills\cli\SKILL.md is missing YAML frontmatter
```
Fix: change `\n` → `\r?\n` in the frontmatter regex and use /\r?\n/ for
line splitting so the script works on both Unix and Windows.

# API and ABI breaking changes

No API or ABI changes

# Expected complexity level and risk

1 - Trivial

# Testing

- [X] When used along side `bump-versions`, this prevents Windows from
having the outlined issue.
2026-07-03 13:01:22 +00:00
clockwork-labs-bot dc20faa611 docs: improve docs and agent discovery metadata (#5243)
## Summary

- Fix TypeScript view examples to use `ctx.sender` as a property,
matching the server SDK `ViewCtx` API.
- Update the architecture overview TypeScript view snippet to use
`players.rowType` and `undefined` for optional view returns.
- Clarify shared `ViewContext` prose so it does not imply every language
uses a callable `ctx.sender()` API.
- Improve docs agent-readiness metadata:
- publish `/docs/robots.txt` with a docs sitemap directive and
Content-Signal policy
- add Markdown alternate links for the existing `/docs/llms.txt` and
`/docs/llms-full.txt` outputs
- generate `/.well-known/agent-skills`-style discovery metadata under
`/docs/.well-known/agent-skills/` from the repo's existing `skills/`
source files during docs builds

## Validation

- `pnpm --dir docs build`
- `pnpm --dir docs typecheck`
- Verified the docs build emits `robots.txt` and
`.well-known/agent-skills/index.json`.
- Verified generated Agent Skills SHA-256 digests match the emitted
`SKILL.md` artifacts.

## Notes

The Cloudflare agent-readiness scan for `spacetimedb.com` still depends
on the root/marketing host exposing root-level files such as
`/robots.txt`, `/sitemap.xml`, and
`/.well-known/agent-skills/index.json`. This PR makes the docs origin
produce the corresponding docs-scoped artifacts at `/docs/...`; the root
host can route or mirror these if we want the exact `spacetimedb.com`
scan to pick them up.

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: rain <rain@rain.local>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
2026-06-13 20:37:38 +00:00