Skip to main content
TypeScript has two first-class integration paths:
  • use @praxa/sdk with a deployment-specific Integration Gateway;
  • use Node.js fetch with the public Execution Fabric API.
Choose one plane per operation.

Prerequisites

  • Node.js 20 or newer
  • TypeScript with ESM (NodeNext or ESNext)
  • either a Gateway origin and delegated OAuth token, or a personal Execution Fabric API key

Path A: Integration Gateway SDK

src/mission.ts
Continue with the SDK quickstart for token refresh, reconnectable SSE, injected-fetch tests, and the complete acceptance matrix.

Path B: Execution Fabric

src/task.ts
Store the key with the exact request body before the first attempt. A 202 response proves durable admission, not task completion.

Add a terminal readback

The key needs execute:write for admission and runs:read for readback.

Test with native fakes

Use Node’s test runner and inject fetch into your own client wrapper. Assert:
  • exact URL, method, header, and body;
  • one stable key for repeated logical input;
  • no token in returned values or logs;
  • 401, 403, 409, 429, and network errors remain distinguishable;
  • polling stops only at a public terminal state.

Troubleshooting

Best practices

  • Reuse one configured SDK or HTTP client per process.
  • Keep all credentials in the server runtime.
  • Use AbortSignal and an overall deadline.
  • Redact authorization and customer payloads from telemetry.
  • Bound concurrency and respect 429 responses.
  • Reconcile every ambiguous mutation through exact replay or readback.

Next.js

Put the TypeScript client behind an authenticated App Router boundary.

Nuxt

Use a Nitro server route and private runtime config.

Optimize for production

  • Reuse one configured HTTP or SDK client per process and bound concurrent upstream work.
  • Prefer durable admission plus asynchronous readback over holding application requests open.
  • Cache only non-sensitive, tenant-scoped reads within their documented freshness window.
  • Measure p50/p95 latency, admission-to-terminal time, retries, conflicts, and connection reuse before tuning.
Optimize only after the correctness and isolation matrix passes. Lower latency or cost is not an improvement if verified outcomes, authority checks, or recovery rates regress.

Cleanup and next steps

  1. Revoke the disposable Praxa key and require a later request to fail.
  2. Remove synthetic application records and any temporary environment files.
  3. Cancel or archive unresolved test runs according to the application policy.
  4. Retain only redacted request, run, and verification identifiers needed for the test record.
After cleanup, run the shared integration test matrix and record any environment-specific check that remains pending.

Frequently asked questions

What proves this tutorial works?

The minimum observable result is that the correct SDK or Fabric plane executes with server-owned credentials and exact replay behavior. A compile, package import, mocked response, or initial admission alone does not prove the complete workflow.

Can a browser, mobile app, or model prompt hold the credential?

No. Browser and mobile bundles are inspectable. Keep the Praxa credential in the trusted application backend.

How should an ambiguous mutation be retried?

Persist the exact logical input and idempotency key before the first attempt. Reconcile through authoritative readback or replay the exact request with that same key before creating new work.

What should we monitor after release?

Monitor application auth failures, upstream status/code, latency, retries, replay conflicts, and terminal run outcomes. Alert on authorization bypass, cross-tenant disclosure, repeated conflicts, or cleanup failure.
Last modified on August 14, 2026