Skip to content

feat: Update Python and Node SDKs for OSS gateway compatibility#4

Merged
wmattadeen-gif merged 1 commit into
mainfrom
feat/sdk-oss-compatibility
Feb 3, 2026
Merged

feat: Update Python and Node SDKs for OSS gateway compatibility#4
wmattadeen-gif merged 1 commit into
mainfrom
feat/sdk-oss-compatibility

Conversation

@matt-dean-git

Copy link
Copy Markdown
Collaborator

Summary

Updates both SDKs to work with the SatGate OSS gateway endpoints instead of the enterprise endpoints that don't exist in the OSS build.

Breaking Changes

All SDK endpoints have been updated from enterprise paths to OSS paths:

  • /v1/mintPOST /api/capability/mint
  • /v1/mint/delegatePOST /api/capability/delegate
  • /api/v1/tokensPOST /api/capability/mint
  • /api/v1/governance/banPOST /api/governance/ban
  • /api/v1/governance/banlistGET /api/governance/graph
  • /healthzGET /health

Enterprise-only services removed: ConfigService, StatsService, tokens.list/get/revoke, governance.unban

Authentication changed from identity-based badge-in to X-Admin-Token header for minting.

Python SDK Changes

  • agent_client.py: Admin token auth (X-Admin-Token), env vars (SATGATE_ADMIN_TOKEN, SATGATE_TOKEN)
  • client.py: Rewritten for OSS endpoints with TokensService (mint/validate/delegate) and GovernanceService (ban/get_graph/reset)
  • langchain.py: Updated to use admin_token/token params
  • models.py: Simplified to match OSS response shapes, added GraphData
  • Removed sdk/python/venv/ and sdk/python/dist/ from git tracking

Node SDK Changes

  • client.ts: Rewritten for OSS endpoints, added ping() method
  • agent-client.ts: Admin token auth, added ping(), validateToken(), delegate()
  • types.ts: Added GraphData, GraphStats, simplified types

New: LangChain Integration Guide

  • docs/guides/langchain-integration.md
  • Single tool, toolkit, budget-aware agents, delegation for workers, L402 payments
  • Full working examples

Housekeeping

  • Added .gitignore (venv, dist, node_modules, IDE files)

BREAKING CHANGE: SDK endpoints updated from enterprise to OSS gateway.

Python SDK:
- agent_client.py: Replace identity-based badge-in with X-Admin-Token auth
  - /v1/mint → POST /api/capability/mint (with X-Admin-Token header)
  - /v1/mint/delegate → POST /api/capability/delegate
  - Add support for pre-existing tokens via 'token' param or SATGATE_TOKEN env
  - Add ping() and validate_token() convenience methods
- client.py: Rewrite for OSS endpoints
  - tokens.mint() → POST /api/capability/mint {scope, duration}
  - tokens.validate() → POST /api/capability/validate
  - tokens.delegate() → POST /api/capability/delegate
  - governance.ban() → POST /api/governance/ban
  - governance.get_graph() → GET /api/governance/graph
  - governance.reset() → POST /api/governance/reset
  - health() → GET /health
  - Remove enterprise-only: ConfigService, StatsService, tokens.list/get/revoke
- langchain.py: Update to use admin_token/token instead of identity providers
- models.py: Simplify to match OSS response shapes, add GraphData model
- __init__.py: Update exports (remove identity providers, add GraphData)

Node SDK:
- client.ts: Rewrite for OSS endpoints (same endpoint changes as Python)
  - Add ping() method for token verification
  - Remove enterprise-only: ConfigService, StatsService, tokens.list/get/revoke
- agent-client.ts: Replace identity-based auth with admin token auth
  - Add adminToken/token options, SATGATE_ADMIN_TOKEN/SATGATE_TOKEN env support
  - Add ping(), validateToken(), delegate() convenience methods
- types.ts: Simplify to match OSS types, add GraphData/GraphStats
- index.ts: Update exports

Docs:
- Add docs/guides/langchain-integration.md with practical examples:
  - SatGateTool single tool usage
  - SatGateToolkit for multiple tools with shared budget
  - Budget-aware agent patterns
  - Delegation for worker agents (least-privilege)
  - L402 Lightning payment integration
  - REST API tool for flexible access
  - Full research agent example

Housekeeping:
- Add .gitignore (sdk/python/venv/, sdk/python/dist/, dist/, node_modules/)
- Remove sdk/python/venv/ and sdk/python/dist/ from git tracking
@vercel

vercel Bot commented Feb 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
satgate Ready Ready Preview, Comment Feb 3, 2026 5:20pm

@wmattadeen-gif wmattadeen-gif merged commit c62487f into main Feb 3, 2026
3 of 5 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.

2 participants