Skip to content

docs: rewrite JavaScript SDK first-use guide#9

Merged
daniel-scrivner merged 1 commit into
mainfrom
codex/omni-5200-js-readme-pilot
Jul 10, 2026
Merged

docs: rewrite JavaScript SDK first-use guide#9
daniel-scrivner merged 1 commit into
mainfrom
codex/omni-5200-js-readme-pilot

Conversation

@daniel-scrivner

Copy link
Copy Markdown
Contributor

Summary

Rewrites the public JavaScript SDK README around one useful first success: install the package, retrieve Apple's latest 10-K, inspect the source-linked response, and understand what to do next. It also corrects standalone repository commands and package discovery metadata.

Linear: OMNI-5200

Scope

  • src/ — SDK source (client, types, resources)
  • test/ — Test suite
  • examples/ — Example programs
  • package.json / dependencies
  • tsconfig.json / tsconfig.build.json — TS config
  • README.md / docs
  • .github/ — CI/CD workflows
  • Build / publish config

Changes

  • Leads with installation, a runnable agentLatestFiling request, and a production-verified compact response with SEC accession and source URL.
  • Reorganizes authentication, errors, pagination, retries, streams, and contributing material beneath the first successful request.
  • Removes monorepo-only commands and internal-facing copy from the public README.
  • Replaces the dead support URL, sharpens npm description copy, and declares Node.js 18+ compatibility.

Verification

bun install --frozen-lockfile  # passed
bun run typecheck              # passed
bun test                       # passed: 93 tests
bun run build                  # passed
Additional verification
npm pack --dry-run --json --ignore-scripts  # passed: 42 files, README included
SECAPI_API_KEY=... bun run examples/agent_workflow.ts
# passed live: Apple entity, latest 10-K, Item 1A with 1,600-character compact content

Three GPT-5.5 High adversarial reviewers covered factual accuracy, editorial quality, and developer experience. Round one findings were addressed; round two passed at 93/100 editorial quality with no blocking findings.

Deployment Impact

  • New version bump in package.json
  • Breaking API change (semver major)
  • npm publish required
  • Docs (README / examples) updated to match
  • Companion docs PR in secapi-ai org docs site

GitHub will show the README after merge. The npm package page will show the new README and metadata with the next package publish.

Completion Attestation

  • 100% complete, 100% functional. All scoped source changes are written, tested, typecheck, build cleanly, and work end-to-end against live SEC API. No source work remains in this PR.
  • Not fully complete or functional. Deltas listed below.

Demo

The checked-in live example returned Apple Inc. (AAPL, CIK 0000320193), accession 0000320193-25-000079, filing date 2025-10-31, and a compact Item 1A result with non-empty content.


Agent Context

Key files to read first:

  • README.md
  • package.json
  • src/index.ts
  • examples/agent_workflow.ts

Decisions made:

  • The opening example uses agentLatestFiling because it yields the smallest source-linked result a new user can verify.
  • Reliability detail remains documented, but no longer blocks the first request.
  • Package metadata changes intentionally wait for the normal next version publish.

Relevant docs:

Conventions applied:

  • External-user-first prose
  • Claims checked against implementation, tests, live API output, and SEC source metadata
  • ESM and API-version behavior stated explicitly

@daniel-scrivner daniel-scrivner marked this pull request as ready for review July 10, 2026 07:23
@daniel-scrivner daniel-scrivner requested a review from Copilot July 10, 2026 07:23
@daniel-scrivner daniel-scrivner merged commit 8635555 into main Jul 10, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the public-facing JavaScript SDK README to lead with a first successful request workflow (install → fetch Apple’s latest 10‑K → inspect a source-linked compact response), and updates npm package metadata to better reflect supported runtimes and support links.

Changes:

  • Restructures README.md around a “first request” path, then organizes common usage topics (pagination, errors, auth, retries, streams, contributing).
  • Updates package.json package description, adds a Node.js engines constraint (18+), and replaces the bugs/support URL with GitHub Issues.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Rewritten first-use guide and reorganized operational docs (auth, retries, streams, etc.).
package.json Updates npm metadata (description, Node engines, bugs URL) to match the public SDK positioning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
```

### Ownership and Institutional Holdings
The SDK also recognizes these environment variables:
Comment thread README.md
Comment on lines +160 to +162
The SDK retries transient failures for safe HTTP methods with exponential backoff and jitter. By default it retries network errors and HTTP `408`, `429`, `502`, `503`, and `504` responses, up to three retries within a 30-second budget. It honors `Retry-After` on rate limits and opens a circuit breaker after five consecutive retryable failures.

```ts
// Market calendar
const calendar = await client.marketCalendar({ market: "XNYS", duration: 3 })
Mutating requests and MCP tool calls use `POST` and are not retried automatically. Opt in only when the operation is safe to repeat:
Comment thread README.md

// Insider trades
const insiders = await client.insiders({ ticker: "AAPL", limit: 10 })
For normal data requests, use an API key. Dashboard and account-management methods require a WorkOS bearer token.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants