@heysummon/consumer-sdk 0.1.1

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.
@@ -0,0 +1,85 @@
1
+ export interface Provider {
2
+ name: string;
3
+ nameLower: string;
4
+ apiKey: string;
5
+ providerId: string;
6
+ providerName: string;
7
+ addedAt: string;
8
+ }
9
+ export interface SubmitRequestOptions {
10
+ question: string;
11
+ messages?: Array<{
12
+ role: string;
13
+ content: string;
14
+ }>;
15
+ signPublicKey?: string;
16
+ encryptPublicKey?: string;
17
+ providerName?: string;
18
+ requiresApproval?: boolean;
19
+ }
20
+ export interface SubmitRequestResult {
21
+ requestId: string;
22
+ refCode: string;
23
+ status: string;
24
+ expiresAt: string;
25
+ providerUnavailable?: boolean;
26
+ nextAvailableAt?: string;
27
+ serverPublicKey?: string;
28
+ }
29
+ export interface PendingEvent {
30
+ type: "new_request" | "new_message" | "keys_exchanged" | "responded" | "closed" | "cancelled";
31
+ requestId: string;
32
+ refCode: string | null;
33
+ from?: "provider" | "consumer";
34
+ messageCount?: number;
35
+ respondedAt?: string | null;
36
+ latestMessageAt?: string | null;
37
+ cancelledAt?: string | null;
38
+ question?: string | null;
39
+ requiresApproval?: boolean;
40
+ createdAt?: string;
41
+ expiresAt?: string;
42
+ }
43
+ export interface Message {
44
+ id: string;
45
+ from: "provider" | "consumer";
46
+ ciphertext: string;
47
+ iv: string;
48
+ authTag: string;
49
+ signature: string;
50
+ messageId: string;
51
+ createdAt: string;
52
+ plaintext?: string;
53
+ }
54
+ export interface RequestStatusResponse {
55
+ requestId: string;
56
+ refCode: string | null;
57
+ status: string;
58
+ response?: string;
59
+ lastMessage?: string;
60
+ question?: string;
61
+ providerName?: string;
62
+ provider?: {
63
+ id: string;
64
+ name: string;
65
+ };
66
+ createdAt?: string;
67
+ expiresAt?: string;
68
+ }
69
+ export interface HeySummonClientOptions {
70
+ baseUrl: string;
71
+ apiKey: string;
72
+ }
73
+ export interface WhoamiResult {
74
+ keyId: string;
75
+ keyName: string | null;
76
+ provider: {
77
+ id: string;
78
+ name: string;
79
+ isActive: boolean;
80
+ };
81
+ expert: {
82
+ id: string;
83
+ name: string | null;
84
+ };
85
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@heysummon/consumer-sdk",
3
+ "version": "0.1.1",
4
+ "description": "TypeScript SDK for HeySummon consumers (AI agents)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "bin": {
15
+ "@heysummon/consumer-sdk": "./dist/cli.js",
16
+ "heysummon-cli": "./dist/cli.js"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "test": "vitest run",
21
+ "test:watch": "vitest"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^25.5.0",
25
+ "msw": "^2.0.0",
26
+ "typescript": "^5.0.0",
27
+ "vitest": "^3.0.0"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "src"
32
+ ],
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/thomasansems/heysummon",
37
+ "directory": "packages/consumer-sdk"
38
+ }
39
+ }