Skip to content

Add LICENSE, AGENTS.md, and richer package metadata#1

Merged
shuakami merged 1 commit into
mainfrom
chore/license-agents-meta
May 6, 2026
Merged

Add LICENSE, AGENTS.md, and richer package metadata#1
shuakami merged 1 commit into
mainfrom
chore/license-agents-meta

Conversation

@shuakami
Copy link
Copy Markdown
Member

@shuakami shuakami commented May 6, 2026

Summary

Land explicit license terms, an agent-facing playbook, and discovery-friendly package metadata.

  • LICENSE (MIT)
  • AGENTS.md — install, typed client surface, auth, errors, rate limits, links to sibling repos
  • Package manifest — English description, MIT license, uapis.cn homepage, search-friendly keywords / classifiers / tags

No code changes; build/publish pipeline untouched.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@shuakami shuakami merged commit 11ddcab into main May 6, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 059e043594

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md
Free-tier endpoints work with no key. Paid endpoints take a key:

```ts
const client = new UapiClient("https://uapis.cn", { apiKey: "sk_…" });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the supported token constructor

When agents follow this auth example, the SDK silently ignores the key because UapiClientOptions only supports disableCache and the constructor only treats a string second argument as the bearer token (src/index.ts:1497-1501). Calls to paid endpoints therefore go out unauthenticated; the existing README uses new UapiClient(baseURL, 'YOUR_API_KEY'), so this example should use the string token form or add real apiKey support.

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
Comment on lines +59 to +66
Methods throw a typed `UapiApiError` on non-2xx responses. The error
carries `code`, `error`, and `requestId` fields. Surface `error` verbatim.

## Rate limits

Headers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`,
`Retry-After` are exposed via `error.response.headers` (and on success
responses via the optional `withResponse` overload). Honor them.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid referencing nonexistent error APIs

Code written from this guidance will not compile or will fail at runtime: the package exports UapiError classes with metadata on error.meta / client.lastResponseMeta, but there is no UapiApiError, no error.response field, and no withResponse overload anywhere in src. Please align this section with the actual exported error surface before agents rely on it.

Useful? React with 👍 / 👎.

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.

1 participant