@semiotic-labs/agentium-sdk
v0.2.1
Published
<!-- SPDX-FileCopyrightText: 2025 Semiotic AI, Inc.
Keywords
Readme
@semiotic-labs/agentium-sdk
A TypeScript SDK to simplify interaction with the /v1/identity/connect API endpoint.
Installation
Install the package using npm:
npm install @semiotic-labs/agentium-sdkUsage
Basic Usage
To connect to the default production API:
import { AgentiumClient } from '@semiotic-labs/agentium-sdk';
const client = new AgentiumClient();
async function connectIdentity() {
try {
const googleToken = 'YOUR_GOOGLE_JWT'; // Replace with your actual Google JWT
const response = await client.connectGoogleIdentity(googleToken);
console.log('Connected Identity:', response);
} catch (error) {
console.error('Failed to connect identity:', error);
}
}
connectIdentity();Advanced Usage: Custom Endpoint
You can specify a custom baseURL in the constructor, which is useful for testing against local or staging environments.
import { AgentiumClient } from '@semiotic-labs/agentium-sdk';
// Example for a local development server
const localClient = new AgentiumClient({
baseURL: 'http://localhost:8080',
});
async function connectIdentityLocal() {
try {
const googleToken = 'YOUR_GOOGLE_JWT';
const response = await localClient.connectGoogleIdentity(googleToken);
console.log('Connected Identity (Local):', response);
} catch (error) {
console.error('Failed to connect identity (Local):', error);
}
}
connectIdentityLocal();For Developers
Project Setup
- Clone the repository.
- Install dependencies:
npm install
REUSE Compliance
This project follows the REUSE Specification. To ensure compliance:
- Install REUSE Tool: You'll need to install the
reusecommand-line tool globally viapip:pip install reuse
Applying SPDX Headers
To add or update SPDX license and copyright headers to all relevant files:
npm run reuse:writeVerify Compliance
To check if the project is fully REUSE compliant:
npm run reuse:checkRunning Tests
To run the test suite:
npm testBuilding the Project
To compile the TypeScript code into JavaScript in the dist folder:
npm run build