Skip to content

Add official typed HTTP Client for issue #1 - #9

Merged
knqiufan merged 1 commit into
mainfrom
feat/m1-typed-client
Aug 26, 2026
Merged

Add official typed HTTP Client for issue #1#9
knqiufan merged 1 commit into
mainfrom
feat/m1-typed-client

Conversation

@knqiufan

Copy link
Copy Markdown
Collaborator

Summary

  • Add the official @powercontext/client typed HTTP Client for the client / C1 profile: hand-written Fetch transport, runtime request and success validation, and 52 OpenAPI-backed methods.
  • Cover every operation against the pinned Python Server as contract reachability: a validated success or an OpenAPI-declared Server error counts. This is not 52 semantic successes.
  • Keep a clean install free of native addons. pnpm pack:smoke packs Protocol and Client and imports them in a temporary project.

Docs claim client / C1 only. Runtime, Server, MCP, CLI, and the Python-repository DSH plugin change are out of scope.

Closes #1

Profile and parity

Checklist

  • Does not add a second wire contract
  • Does not hand-edit contract/ or conformance/ snapshots
  • Generated openapi-types.ts is regenerated from tools/generate-protocol so server-defaulted request fields stay optional
  • Baseline bump, if any, is this pull request’s only purpose (none)
  • Compatibility: undeclared 2xx is a Server error; malformed UTF-8 success bodies are rejected

Test plan

pnpm format
pnpm lint
pnpm typecheck
pnpm build
pnpm test
pnpm generate:check
pnpm conformance
pnpm pack:smoke

CI quality should run POWERCONTEXT_CLIENT_CALLTHROUGH=1 pnpm test after oracle bootstrap. Confirm Node 22/24 client-matrix and three-OS smoke stay green. Local verification already passed pnpm test:client (including 52/52 call-through) and pnpm pack:smoke.

Give callers 52 OpenAPI-backed methods, a strict Fetch transport, and
Python Server call-through so a clean project can install the package
without native addons.
@knqiufan
knqiufan merged commit 253b27a into main Aug 26, 2026
10 checks passed
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.

Typed Client transport and 52 methods

1 participant