Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 9 additions & 12 deletions .agents/skills/distilled-sdk/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ this table is the whole decision.
| Whole directories inside a huge git repo | `spec-repos/aws`, `spec-repos/azure` | blobless (`--filter=blob:none`) + `--no-checkout` clone, narrow sparse patterns from the tree, only then fetch blobs |
| An index that enumerates many documents | `spec-repos/gcp` | crawl the discovery directory, write `_manifest.json` + one doc per entry |
| A GraphQL endpoint | `spec-repos/railway`, `spec-repos/expo-eas` | introspection query → `schema.json` |
| Only human docs (markdown/HTML) | nothing yet — read the cloudflare note below first | download + parse |
| Only human docs (markdown/HTML) | `spec-repos/cloudflare` | crawl an index, download markdown, validate it is not HTML |

A YAML spec does not have to be converted in the mirror: `spec-repos/coinbase`
mirrors `openapi.yaml` verbatim and `packages/coinbase/scripts/convert.ts`
Expand All @@ -59,13 +59,12 @@ in the mirror only when the upstream is an endpoint rather than a file.

**When the user says "like GitHub"** they mean a few files out of a big repo —
raw download, no clone. **"Like cloudflare"** means the description has to be
scraped out of documentation pages. `packages/cloudflare` is the cautionary
example, not the model: its upstream moved to Astro and now serves HTML at
every `index.md` URL, so `spec-mirror-cloudflare` is `blocked` in the manifest
and the package runs off a stale snapshot. If you are about to scrape docs,
first check whether the provider publishes a real machine-readable description
somewhere — that is nearly always the better spec, and it is what unblocks
cloudflare too (`cloudflare/api-schemas`).
scraped out of documentation pages. Copy `spec-repos/cloudflare`: crawl an
index, download markdown, and **reject HTML** (resource index pages on that
host still serve the full HTML document at `index.md`). If you are about to
scrape docs, first check whether the provider publishes a real
machine-readable description somewhere — that is nearly always the better
spec.

Rules every `fetch-specs.ts` follows:

Expand Down Expand Up @@ -228,10 +227,8 @@ segment, which is why every package's declared path is
A path that reads through some other layout resolves to a file the mirror
does not have, and `resolveSpecPath` says so rather than failing later.

Two packages are not wired to it. `aws` resolves its models directory inside
`runGeneratorCli` rather than at the call site. `cloudflare` takes its spec
root as a `--specs` flag and its mirror is `blocked` — see the stack README —
so it is the one package still reading a stale in-repo snapshot.
One package is not wired to it the usual way. `aws` resolves its models
directory inside `runGeneratorCli` rather than at the call site.

`fly-io` is the one package that reads more than its mirror: `specs/sprites`,
`specs/mpg` and `specs/addons` are small hand-maintained documents committed
Expand Down
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
url = https://github.com/distilled-mirror/spec-mirror-azure.git
shallow = true
ignore = dirty
[submodule "packages/cloudflare/specs/spec-mirror-cloudflare"]
path = packages/cloudflare/specs/spec-mirror-cloudflare
url = https://github.com/distilled-mirror/spec-mirror-cloudflare.git
ignore = dirty
shallow = true
[submodule "packages/coinbase/specs/spec-mirror-coinbase"]
path = packages/coinbase/specs/spec-mirror-coinbase
url = https://github.com/distilled-mirror/spec-mirror-coinbase.git
Expand Down
5 changes: 3 additions & 2 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,13 @@
},
"scripts": {
"build": "tsc -b",
"download-api-docs": "bun scripts/download-api-docs.ts",
"convert": "bun scripts/spec-to-smithy.ts",
"spec-to-smithy": "bun scripts/spec-to-smithy.ts",
"generate": "bun scripts/generate.ts",
"typecheck": "tsc -p tsconfig.json",
"typecheck:strict": "tsc -p tsconfig.strict.json"
"typecheck:strict": "tsc -p tsconfig.strict.json",
"specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-cloudflare",
"specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-cloudflare"
},
"dependencies": {
"@distilled.cloud/core": "workspace:*"
Expand Down
265 changes: 0 additions & 265 deletions packages/cloudflare/scripts/download-api-docs.ts

This file was deleted.

Loading