@semiotic-labs/agentium-sdk 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +117 -1
  2. package/package.json +36 -4
package/README.md CHANGED
@@ -1 +1,117 @@
1
- # agentium-sdk
1
+ <!--
2
+ SPDX-FileCopyrightText: 2025 Semiotic AI, Inc.
3
+
4
+ SPDX-License-Identifier: MIT
5
+ -->
6
+
7
+ # @semiotic-labs/agentium-sdk
8
+
9
+ A TypeScript SDK to simplify interaction with the `/v1/identity/connect` API endpoint.
10
+
11
+ ## Installation
12
+
13
+ Install the package using npm:
14
+
15
+ ```bash
16
+ npm install @semiotic-labs/agentium-sdk
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ### Basic Usage
22
+
23
+ To connect to the default production API:
24
+
25
+ ```typescript
26
+ import { AgentiumClient } from '@semiotic-labs/agentium-sdk';
27
+
28
+ const client = new AgentiumClient();
29
+
30
+ async function connectIdentity() {
31
+ try {
32
+ const googleToken = 'YOUR_GOOGLE_JWT'; // Replace with your actual Google JWT
33
+ const response = await client.connectGoogleIdentity(googleToken);
34
+ console.log('Connected Identity:', response);
35
+ } catch (error) {
36
+ console.error('Failed to connect identity:', error);
37
+ }
38
+ }
39
+
40
+ connectIdentity();
41
+ ```
42
+
43
+ ### Advanced Usage: Custom Endpoint
44
+
45
+ You can specify a custom `baseURL` in the constructor, which is useful for testing against local or staging environments.
46
+
47
+ ```typescript
48
+ import { AgentiumClient } from '@semiotic-labs/agentium-sdk';
49
+
50
+ // Example for a local development server
51
+ const localClient = new AgentiumClient({
52
+ baseURL: 'http://localhost:8080',
53
+ });
54
+
55
+ async function connectIdentityLocal() {
56
+ try {
57
+ const googleToken = 'YOUR_GOOGLE_JWT';
58
+ const response = await localClient.connectGoogleIdentity(googleToken);
59
+ console.log('Connected Identity (Local):', response);
60
+ } catch (error) {
61
+ console.error('Failed to connect identity (Local):', error);
62
+ }
63
+ }
64
+
65
+ connectIdentityLocal();
66
+ ```
67
+
68
+ ## For Developers
69
+
70
+ ### Project Setup
71
+
72
+ 1. Clone the repository.
73
+ 2. Install dependencies:
74
+ ```bash
75
+ npm install
76
+ ```
77
+
78
+ ### REUSE Compliance
79
+
80
+ This project follows the [REUSE Specification](https://reuse.software/spec/). To ensure compliance:
81
+
82
+ 1. **Install REUSE Tool:** You'll need to install the `reuse` command-line tool globally via `pip`:
83
+ ```bash
84
+ pip install reuse
85
+ ```
86
+
87
+ ### Applying SPDX Headers
88
+
89
+ To add or update SPDX license and copyright headers to all relevant files:
90
+
91
+ ```bash
92
+ npm run reuse:write
93
+ ```
94
+
95
+ ### Verify Compliance
96
+
97
+ To check if the project is fully REUSE compliant:
98
+
99
+ ```bash
100
+ npm run reuse:check
101
+ ```
102
+
103
+ ### Running Tests
104
+
105
+ To run the test suite:
106
+
107
+ ```bash
108
+ npm test
109
+ ```
110
+
111
+ ### Building the Project
112
+
113
+ To compile the TypeScript code into JavaScript in the `dist` folder:
114
+
115
+ ```bash
116
+ npm run build
117
+ ```
package/package.json CHANGED
@@ -1,10 +1,23 @@
1
1
  {
2
2
  "name": "@semiotic-labs/agentium-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
+ "type": "module",
4
5
  "description": "",
5
- "main": "index.js",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
6
11
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
12
+ "test": "vitest",
13
+ "build": "tsc",
14
+ "docs": "typedoc",
15
+ "lint": "eslint src/**/*.ts",
16
+ "format:check": "prettier --check .",
17
+ "format:write": "prettier --write .",
18
+ "check": "npm run lint && npm run format:check",
19
+ "reuse:check": "reuse lint",
20
+ "reuse:write": "reuse annotate --license MIT --copyright \"Semiotic AI, Inc.\" --year 2025 -r . --fallback-dot-license --skip-existing"
8
21
  },
9
22
  "repository": {
10
23
  "type": "git",
@@ -16,5 +29,24 @@
16
29
  "bugs": {
17
30
  "url": "https://github.com/semiotic-agentium/agentium-sdk/issues"
18
31
  },
19
- "homepage": "https://github.com/semiotic-agentium/agentium-sdk#readme"
32
+ "homepage": "https://github.com/semiotic-agentium/agentium-sdk#readme",
33
+ "engines": {
34
+ "node": ">=22.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^24.10.1",
38
+ "axios-mock-adapter": "^2.1.0",
39
+ "eslint": "^9.39.1",
40
+ "eslint-config-prettier": "^10.1.8",
41
+ "eslint-plugin-prettier": "^5.5.4",
42
+ "prettier": "^3.7.4",
43
+ "ts-node": "^10.9.2",
44
+ "typedoc": "^0.28.15",
45
+ "typescript": "^5.9.3",
46
+ "typescript-eslint": "^8.48.1",
47
+ "vitest": "^4.0.15"
48
+ },
49
+ "dependencies": {
50
+ "axios": "^1.13.2"
51
+ }
20
52
  }