Skip to content
← Public packages

@kody/hn-pulse

Quick onboarding example: Hacker News top stories via Firebase HN API (zero OAuth).

AGENTS.md

51 lines · 1.4 KB · Markdown

@kody/hn-pulse — agent notes

Human setup and intent live in README.md. This file is for agents: imports, smoke checks, and edge cases. No user secrets. Do not disable live webhooks or jobs.

Secrets

None. Public Firebase HN API (hacker-news.firebaseio.com).

Import paths

ExportImport
overview / getTopStories namedkody:@kody/hn-pulse
getTopStories (default export)kody:@kody/hn-pulse/getTopStories

Prefer static kody:@kody/hn-pulse/... imports from execute. Do not lead with packages.invoke.

Named ESM exports work via static import { ... }. For keyless packages.invoke, use a subpath whose default export is the function (for example exportName: "getTopStories"), or call the root default dispatcher.

Smoke test (read-only)

import { getTopStories } from 'kody:@kody/hn-pulse'

export default async function main() {
	return await getTopStories({ limit: 5 })
}

Subpath default export:

import getTopStories from 'kody:@kody/hn-pulse/getTopStories'

export default async function main() {
	return await getTopStories({ limit: 5 })
}

Edge cases

  • limit is clamped to 1–30 (default 10).
  • Stories without a URL (Ask HN / Show HN text posts) may omit url; still return title/score/by/descendants when present.
  • Fork-friendly starter — keep it zero-auth when teaching keyless HTTP.