Skip to content

feat: implement device exchange and signer token management#19

Merged
eliteprox merged 10 commits into
mainfrom
feat/new-signer
Jun 2, 2026
Merged

feat: implement device exchange and signer token management#19
eliteprox merged 10 commits into
mainfrom
feat/new-signer

Conversation

@eliteprox
Copy link
Copy Markdown
Collaborator

  • Added new functionality for device token exchange and signer session management in the src/signer module.
  • Introduced device-exchange.ts for handling device token exchanges and minting signer tokens.
  • Implemented forward.ts for forwarding requests with JWT identity headers.
  • Created token-manager.ts to manage cached signer tokens efficiently.
  • Updated server.ts to handle direct signer proxy requests and responses.
  • Added comprehensive tests for the new features in test/signer to ensure reliability and correctness.
  • Updated package.json and tsup.config.ts to include new entry points for the signer module.

eliteprox and others added 10 commits May 30, 2026 20:45
- Added new functionality for device token exchange and signer session management in the `src/signer` module.
- Introduced `device-exchange.ts` for handling device token exchanges and minting signer tokens.
- Implemented `forward.ts` for forwarding requests with JWT identity headers.
- Created `token-manager.ts` to manage cached signer tokens efficiently.
- Updated `server.ts` to handle direct signer proxy requests and responses.
- Added comprehensive tests for the new features in `test/signer` to ensure reliability and correctness.
- Updated `package.json` and `tsup.config.ts` to include new entry points for the signer module.
…dule

- Introduced utility functions for JSON response parsing and field validation in `fetch-json.ts` and `json-fields.ts`.
- Replaced inline error handling with the new utilities in `device-exchange.ts`, `mint-token.ts`, and `server.ts` for improved readability and maintainability.
- Removed redundant error response functions to consolidate error handling logic in `handler-errors.ts`.
- Updated related files to utilize the new error handling structure, enhancing consistency across the signer module.
- Refactored `resolveMint` in `device-exchange.ts` to directly use the config object, improving clarity and reducing redundancy.
- Introduced a new utility function `oauthFailureDescription` in `fetch-json.ts` for consistent error message generation during OAuth failures.
- Updated error handling in `readJsonObjectFromResponse` to utilize the new utility function, enhancing maintainability.
- Consolidated type definitions in `proxy.ts` by exporting multiple types together for better organization.
- Added helper functions in `proxy.ts` for URL joining and body string aliasing to streamline request handling.
- Improved test coverage in `device-exchange.test.ts` with new utility functions for better input handling and response validation.
Expose plan-pricing helpers, signed-ticket ingest, PmtHouseClient billing
methods, and optional pymthouse_hosted metering on the signer proxy so
integrators can use OpenMeter-aligned plans without pymthouse-local copies.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace ReDoS-prone retail rate regex with linear trim, fix negated
conditions in proxy alias pickers, and use typed fetch URL helpers in tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Added new files for handling lv2v sessions, orchestrator communication, and payment sessions.
- Introduced functions for starting lv2v sessions, managing payment headers, and publishing trickle segments.
- Implemented session storage and management for gateway sessions.
- Created API key exchange functionality for signer sessions.
- Added tests for gateway authentication and capabilities.
- Updated build configuration to include new gateway server and client entry points.
- Added support for exchanging long-lived API keys for short-lived signer sessions in the PmtHouseClient.
- Introduced new gateway client and server modules for handling live video streaming and session management.
- Implemented discovery and orchestrator interaction features in the gateway server.
- Updated README with new usage examples for API key integration and gateway functionalities.
- Added new scripts for checking gRPC peer dependencies and smoke testing gateway sessions.
- Enhanced package.json with new peer dependencies and entry points for the gateway module.
- Updated ESLint configuration to ignore additional directories.
- Introduced a new function `isSafePathSegment` for validating session IDs in the gateway session smoke test.
- Refactored bearer token extraction to handle case insensitivity and whitespace.
- Added utility functions for stripping OIDC path suffixes and improved session management in the gateway server.
- Enhanced error handling and response parsing in the gateway session handler.
- Updated tests to cover new functionality and ensure robustness.
- Simplified address extraction logic in `parseDiscoveryList` for better readability and efficiency.
- Enhanced `pickCertAuthority` to handle both string and array types for certificate common names, ensuring robust return values.
- Introduced `sonar-project.properties` for SonarQube integration, specifying project key, source directories, and exclusions.
- Refactored gateway session handling in `gateway-session-smoke.mjs` and `stream-with-api-key.mjs` to utilize `parseHttpOrigin` for improved URL parsing.
- Updated logging to provide clearer session status messages.
- Enhanced utility functions in `string-utils.ts` for validating session IDs and parsing HTTP origins.
- Improved error handling in session management and discovery processes.
- Updated tests to cover new functionality and ensure robustness.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

@eliteprox eliteprox merged commit f100e8d into main Jun 2, 2026
4 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.

1 participant