eric-sdk 0.1.4 → 0.1.5

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.
package/dist/index.d.cts CHANGED
@@ -23,176 +23,4 @@ declare class EricSDK {
23
23
  decide(input: DecideInput): Promise<EricResponse>;
24
24
  }
25
25
 
26
- interface ShortTextSummary {
27
- summary: string;
28
- }
29
- interface QAItem {
30
- question: string;
31
- answer: string;
32
- }
33
- interface QuestionAnswerSummary {
34
- summary: string;
35
- questions: QAItem[];
36
- }
37
- interface DailyNudge {
38
- nudge: string;
39
- }
40
- interface RecommendationItem {
41
- id: string;
42
- title: string;
43
- reason: string;
44
- }
45
- interface SessionRecommendation {
46
- recommendations: RecommendationItem[];
47
- rationale: string;
48
- }
49
- interface AICoachFeedback {
50
- summary: string;
51
- encouragement: string;
52
- suggestedNextFocus: string;
53
- tone: string;
54
- }
55
- interface WellnessProgress {
56
- summary: string;
57
- encouragement: string;
58
- tone: string;
59
- }
60
- interface TrendInsight {
61
- trendSummary: string;
62
- emotionalPattern: string;
63
- recommendation: string;
64
- tone: string;
65
- }
66
- interface EventSummaryDigest {
67
- summary: string;
68
- highlights: string[];
69
- tone: string;
70
- }
71
- interface SpeakerPerformance {
72
- overview: string;
73
- strengths: string[];
74
- areasForImprovement: string[];
75
- tone: string;
76
- }
77
- interface NetworkingMatches {
78
- matches: string[];
79
- rationale: string;
80
- }
81
- interface AttendeeEngagement {
82
- overview: string;
83
- topSessions: string[];
84
- recommendations: string[];
85
- tone: string;
86
- }
87
- interface EventPulse {
88
- trendSummary: string;
89
- sentimentOverview: string;
90
- engagementInsights: string;
91
- recommendation: string;
92
- tone: string;
93
- }
94
- interface SessionRecap {
95
- recap: string;
96
- takeaways: string[];
97
- tone: string;
98
- }
99
- interface SponsorValueSummary {
100
- overview: string;
101
- highlights: string[];
102
- tone: string;
103
- }
104
- interface AnnouncementRewrite {
105
- rewritten: string;
106
- toneUsed: string;
107
- }
108
- interface LeadershipInsight {
109
- insight: string;
110
- rootCause: string;
111
- practicalSteps: string[];
112
- tone: string;
113
- }
114
- interface FeedbackInsight {
115
- sentiment: string;
116
- summary: string;
117
- highlights: string[];
118
- }
119
- interface PerformanceReview {
120
- summaryParagraph: string;
121
- strengthsSection: string[];
122
- growthSection: string[];
123
- tone: string;
124
- }
125
- interface TeamDynamics {
126
- diagnosis: string;
127
- risks: string[];
128
- suggestedMoves: string[];
129
- tone: string;
130
- }
131
- interface ProductivityInsight {
132
- insight: string;
133
- suggestions: string[];
134
- tone: string;
135
- }
136
-
137
- declare function isSummary(result: any): result is {
138
- data: ShortTextSummary;
139
- };
140
- declare function isQA(result: any): result is {
141
- data: QuestionAnswerSummary;
142
- };
143
- declare function isNudge(result: any): result is {
144
- data: DailyNudge;
145
- };
146
- declare function isRecommendation(result: any): result is {
147
- data: SessionRecommendation;
148
- };
149
- declare function isAICoachFeedback(result: any): result is {
150
- data: AICoachFeedback;
151
- };
152
- declare function isWellnessProgress(result: any): result is {
153
- data: WellnessProgress;
154
- };
155
- declare function isTrendInsight(result: any): result is {
156
- data: TrendInsight;
157
- };
158
- declare function isEventSummary(result: any): result is {
159
- data: EventSummaryDigest;
160
- };
161
- declare function isSpeakerPerformance(result: any): result is {
162
- data: SpeakerPerformance;
163
- };
164
- declare function isNetworkingMatches(result: any): result is {
165
- data: NetworkingMatches;
166
- };
167
- declare function isAttendeeEngagement(result: any): result is {
168
- data: AttendeeEngagement;
169
- };
170
- declare function isEventPulse(result: any): result is {
171
- data: EventPulse;
172
- };
173
- declare function isSessionRecap(result: any): result is {
174
- data: SessionRecap;
175
- };
176
- declare function isSponsorSummary(result: any): result is {
177
- data: SponsorValueSummary;
178
- };
179
- declare function isAnnouncementRewrite(result: any): result is {
180
- data: AnnouncementRewrite;
181
- };
182
- declare function isLeadershipInsight(result: any): result is {
183
- data: LeadershipInsight;
184
- };
185
- declare function isFeedbackInsight(result: any): result is {
186
- data: FeedbackInsight;
187
- };
188
- declare function isProductivityInsight(result: any): result is {
189
- data: ProductivityInsight;
190
- };
191
- declare function isTeamDynamics(result: any): result is {
192
- data: TeamDynamics;
193
- };
194
- declare function isPerformanceReview(result: any): result is {
195
- data: PerformanceReview;
196
- };
197
-
198
- export { type AICoachFeedback, type AnnouncementRewrite, type AttendeeEngagement, type DailyNudge, type DecideInput, type EricClientOptions, type EricResponse, EricSDK, type EventPulse, type EventSummaryDigest, type FeedbackInsight, type LeadershipInsight, type NetworkingMatches, type PerformanceReview, type ProductivityInsight, type QAItem, type QuestionAnswerSummary, type RecommendationItem, type SessionRecap, type SessionRecommendation, type ShortTextSummary, type SpeakerPerformance, type SponsorValueSummary, type TeamDynamics, type TrendInsight, type WellnessProgress, isAICoachFeedback, isAnnouncementRewrite, isAttendeeEngagement, isEventPulse, isEventSummary, isFeedbackInsight, isLeadershipInsight, isNetworkingMatches, isNudge, isPerformanceReview, isProductivityInsight, isQA, isRecommendation, isSessionRecap, isSpeakerPerformance, isSponsorSummary, isSummary, isTeamDynamics, isTrendInsight, isWellnessProgress };
26
+ export { type DecideInput, type EricClientOptions, type EricResponse, EricSDK };
package/dist/index.d.ts CHANGED
@@ -23,176 +23,4 @@ declare class EricSDK {
23
23
  decide(input: DecideInput): Promise<EricResponse>;
24
24
  }
25
25
 
26
- interface ShortTextSummary {
27
- summary: string;
28
- }
29
- interface QAItem {
30
- question: string;
31
- answer: string;
32
- }
33
- interface QuestionAnswerSummary {
34
- summary: string;
35
- questions: QAItem[];
36
- }
37
- interface DailyNudge {
38
- nudge: string;
39
- }
40
- interface RecommendationItem {
41
- id: string;
42
- title: string;
43
- reason: string;
44
- }
45
- interface SessionRecommendation {
46
- recommendations: RecommendationItem[];
47
- rationale: string;
48
- }
49
- interface AICoachFeedback {
50
- summary: string;
51
- encouragement: string;
52
- suggestedNextFocus: string;
53
- tone: string;
54
- }
55
- interface WellnessProgress {
56
- summary: string;
57
- encouragement: string;
58
- tone: string;
59
- }
60
- interface TrendInsight {
61
- trendSummary: string;
62
- emotionalPattern: string;
63
- recommendation: string;
64
- tone: string;
65
- }
66
- interface EventSummaryDigest {
67
- summary: string;
68
- highlights: string[];
69
- tone: string;
70
- }
71
- interface SpeakerPerformance {
72
- overview: string;
73
- strengths: string[];
74
- areasForImprovement: string[];
75
- tone: string;
76
- }
77
- interface NetworkingMatches {
78
- matches: string[];
79
- rationale: string;
80
- }
81
- interface AttendeeEngagement {
82
- overview: string;
83
- topSessions: string[];
84
- recommendations: string[];
85
- tone: string;
86
- }
87
- interface EventPulse {
88
- trendSummary: string;
89
- sentimentOverview: string;
90
- engagementInsights: string;
91
- recommendation: string;
92
- tone: string;
93
- }
94
- interface SessionRecap {
95
- recap: string;
96
- takeaways: string[];
97
- tone: string;
98
- }
99
- interface SponsorValueSummary {
100
- overview: string;
101
- highlights: string[];
102
- tone: string;
103
- }
104
- interface AnnouncementRewrite {
105
- rewritten: string;
106
- toneUsed: string;
107
- }
108
- interface LeadershipInsight {
109
- insight: string;
110
- rootCause: string;
111
- practicalSteps: string[];
112
- tone: string;
113
- }
114
- interface FeedbackInsight {
115
- sentiment: string;
116
- summary: string;
117
- highlights: string[];
118
- }
119
- interface PerformanceReview {
120
- summaryParagraph: string;
121
- strengthsSection: string[];
122
- growthSection: string[];
123
- tone: string;
124
- }
125
- interface TeamDynamics {
126
- diagnosis: string;
127
- risks: string[];
128
- suggestedMoves: string[];
129
- tone: string;
130
- }
131
- interface ProductivityInsight {
132
- insight: string;
133
- suggestions: string[];
134
- tone: string;
135
- }
136
-
137
- declare function isSummary(result: any): result is {
138
- data: ShortTextSummary;
139
- };
140
- declare function isQA(result: any): result is {
141
- data: QuestionAnswerSummary;
142
- };
143
- declare function isNudge(result: any): result is {
144
- data: DailyNudge;
145
- };
146
- declare function isRecommendation(result: any): result is {
147
- data: SessionRecommendation;
148
- };
149
- declare function isAICoachFeedback(result: any): result is {
150
- data: AICoachFeedback;
151
- };
152
- declare function isWellnessProgress(result: any): result is {
153
- data: WellnessProgress;
154
- };
155
- declare function isTrendInsight(result: any): result is {
156
- data: TrendInsight;
157
- };
158
- declare function isEventSummary(result: any): result is {
159
- data: EventSummaryDigest;
160
- };
161
- declare function isSpeakerPerformance(result: any): result is {
162
- data: SpeakerPerformance;
163
- };
164
- declare function isNetworkingMatches(result: any): result is {
165
- data: NetworkingMatches;
166
- };
167
- declare function isAttendeeEngagement(result: any): result is {
168
- data: AttendeeEngagement;
169
- };
170
- declare function isEventPulse(result: any): result is {
171
- data: EventPulse;
172
- };
173
- declare function isSessionRecap(result: any): result is {
174
- data: SessionRecap;
175
- };
176
- declare function isSponsorSummary(result: any): result is {
177
- data: SponsorValueSummary;
178
- };
179
- declare function isAnnouncementRewrite(result: any): result is {
180
- data: AnnouncementRewrite;
181
- };
182
- declare function isLeadershipInsight(result: any): result is {
183
- data: LeadershipInsight;
184
- };
185
- declare function isFeedbackInsight(result: any): result is {
186
- data: FeedbackInsight;
187
- };
188
- declare function isProductivityInsight(result: any): result is {
189
- data: ProductivityInsight;
190
- };
191
- declare function isTeamDynamics(result: any): result is {
192
- data: TeamDynamics;
193
- };
194
- declare function isPerformanceReview(result: any): result is {
195
- data: PerformanceReview;
196
- };
197
-
198
- export { type AICoachFeedback, type AnnouncementRewrite, type AttendeeEngagement, type DailyNudge, type DecideInput, type EricClientOptions, type EricResponse, EricSDK, type EventPulse, type EventSummaryDigest, type FeedbackInsight, type LeadershipInsight, type NetworkingMatches, type PerformanceReview, type ProductivityInsight, type QAItem, type QuestionAnswerSummary, type RecommendationItem, type SessionRecap, type SessionRecommendation, type ShortTextSummary, type SpeakerPerformance, type SponsorValueSummary, type TeamDynamics, type TrendInsight, type WellnessProgress, isAICoachFeedback, isAnnouncementRewrite, isAttendeeEngagement, isEventPulse, isEventSummary, isFeedbackInsight, isLeadershipInsight, isNetworkingMatches, isNudge, isPerformanceReview, isProductivityInsight, isQA, isRecommendation, isSessionRecap, isSpeakerPerformance, isSponsorSummary, isSummary, isTeamDynamics, isTrendInsight, isWellnessProgress };
26
+ export { type DecideInput, type EricClientOptions, type EricResponse, EricSDK };
package/dist/index.js CHANGED
@@ -33,88 +33,6 @@ var EricSDK = class {
33
33
  return res.data.output;
34
34
  }
35
35
  };
36
-
37
- // src/flows/helper.ts
38
- function isSummary(result) {
39
- return result.flow === "shortTextSummary";
40
- }
41
- function isQA(result) {
42
- return result.flow === "questionAnswerHelper";
43
- }
44
- function isNudge(result) {
45
- return result.flow === "dailyNudgeGenerator";
46
- }
47
- function isRecommendation(result) {
48
- return result.flow === "personalizedSessionRecommender";
49
- }
50
- function isAICoachFeedback(result) {
51
- return result.flow === "aiCoachFeedback";
52
- }
53
- function isWellnessProgress(result) {
54
- return result.flow === "wellnessProgressReporter";
55
- }
56
- function isTrendInsight(result) {
57
- return result.flow === "trendInsightReporter";
58
- }
59
- function isEventSummary(result) {
60
- return result.flow === "eventSummaryDigest";
61
- }
62
- function isSpeakerPerformance(result) {
63
- return result.flow === "speakerPerformanceAnalyzer";
64
- }
65
- function isNetworkingMatches(result) {
66
- return result.flow === "networkingMatchmaker";
67
- }
68
- function isAttendeeEngagement(result) {
69
- return result.flow === "attendeeEngagementReporter";
70
- }
71
- function isEventPulse(result) {
72
- return result.flow === "eventPulseReport";
73
- }
74
- function isSessionRecap(result) {
75
- return result.flow === "sessionRecapGenerator";
76
- }
77
- function isSponsorSummary(result) {
78
- return result.flow === "sponsorValueSummary";
79
- }
80
- function isAnnouncementRewrite(result) {
81
- return result.flow === "announcementRewriter";
82
- }
83
- function isLeadershipInsight(result) {
84
- return result.flow === "leadershipInsight";
85
- }
86
- function isFeedbackInsight(result) {
87
- return result.flow === "feedbackInsightAnalyzer";
88
- }
89
- function isProductivityInsight(result) {
90
- return result.flow === "productivityCoach";
91
- }
92
- function isTeamDynamics(result) {
93
- return result.flow === "teamDynamicsAnalyzer";
94
- }
95
- function isPerformanceReview(result) {
96
- return result.flow === "performanceReviewAssistant";
97
- }
98
36
  export {
99
- EricSDK,
100
- isAICoachFeedback,
101
- isAnnouncementRewrite,
102
- isAttendeeEngagement,
103
- isEventPulse,
104
- isEventSummary,
105
- isFeedbackInsight,
106
- isLeadershipInsight,
107
- isNetworkingMatches,
108
- isNudge,
109
- isPerformanceReview,
110
- isProductivityInsight,
111
- isQA,
112
- isRecommendation,
113
- isSessionRecap,
114
- isSpeakerPerformance,
115
- isSponsorSummary,
116
- isSummary,
117
- isTeamDynamics,
118
- isTrendInsight,
119
- isWellnessProgress
37
+ EricSDK
120
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eric-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Official SDK for enforcing policy-governed AI execution using the Eric AI governance layer",
5
5
  "author": "Rod Bridges",
6
6
  "license": "MIT",
package/src/client.ts CHANGED
@@ -1,67 +1,67 @@
1
- import axios from "axios";
2
-
3
- export interface EricClientOptions {
4
- apiKey: string;
5
- client: string; // ingomu, eventinterface, etc.
6
- baseUrl?: string;
7
- }
8
-
9
- export interface EricResponse {
10
- flow: string;
11
- type: string;
12
- data: any;
13
- }
14
-
15
- export interface DecideInput {
16
- text?: string;
17
- topic?: string;
18
- requestType?: string;
19
- userState?: any;
20
- allowedFlows?: string[];
21
- }
22
-
23
- export class EricSDK {
24
- private apiKey: string;
25
- private client: string;
26
- private baseUrl: string;
27
-
28
- constructor(options: EricClientOptions) {
29
- this.apiKey = options.apiKey;
30
- this.client = options.client;
31
- this.baseUrl =
32
- options.baseUrl ??
33
- "https://us-central1-eric-ai-prod.cloudfunctions.net/decide";
34
- }
35
-
36
- /* -------------------------------------------------------------
37
- * DECIDE — policy-governed execution
38
- * ------------------------------------------------------------- */
39
- async decide(input: DecideInput): Promise<EricResponse> {
40
- const { allowedFlows, requestType, ...rest } = input;
41
-
42
- const payload: any = {
43
- data: {
44
- ...rest,
45
- text: rest.text ?? "implicit_intent",
46
- },
47
- };
48
-
49
- if (requestType) {
50
- payload.data.requestType = requestType;
51
- }
52
-
53
- if (allowedFlows) {
54
- payload.data.allowedFlows = allowedFlows;
55
- }
56
-
57
- const res = await axios.post(this.baseUrl, payload, {
58
- headers: {
59
- "x-api-key": this.apiKey,
60
- "x-api-client": this.client,
61
- "Content-Type": "application/json",
62
- },
63
- });
64
-
65
- return res.data.output;
66
- }
67
- }
1
+ import axios from "axios";
2
+
3
+ export interface EricClientOptions {
4
+ apiKey: string;
5
+ client: string; // ingomu, eventinterface, etc.
6
+ baseUrl?: string;
7
+ }
8
+
9
+ export interface EricResponse {
10
+ flow: string;
11
+ type: string;
12
+ data: any;
13
+ }
14
+
15
+ export interface DecideInput {
16
+ text?: string;
17
+ topic?: string;
18
+ requestType?: string;
19
+ userState?: any;
20
+ allowedFlows?: string[];
21
+ }
22
+
23
+ export class EricSDK {
24
+ private apiKey: string;
25
+ private client: string;
26
+ private baseUrl: string;
27
+
28
+ constructor(options: EricClientOptions) {
29
+ this.apiKey = options.apiKey;
30
+ this.client = options.client;
31
+ this.baseUrl =
32
+ options.baseUrl ??
33
+ "https://us-central1-eric-ai-prod.cloudfunctions.net/decide";
34
+ }
35
+
36
+ /* -------------------------------------------------------------
37
+ * DECIDE — policy-governed execution
38
+ * ------------------------------------------------------------- */
39
+ async decide(input: DecideInput): Promise<EricResponse> {
40
+ const { allowedFlows, requestType, ...rest } = input;
41
+
42
+ const payload: any = {
43
+ data: {
44
+ ...rest,
45
+ text: rest.text ?? "implicit_intent",
46
+ },
47
+ };
48
+
49
+ if (requestType) {
50
+ payload.data.requestType = requestType;
51
+ }
52
+
53
+ if (allowedFlows) {
54
+ payload.data.allowedFlows = allowedFlows;
55
+ }
56
+
57
+ const res = await axios.post(this.baseUrl, payload, {
58
+ headers: {
59
+ "x-api-key": this.apiKey,
60
+ "x-api-client": this.client,
61
+ "Content-Type": "application/json",
62
+ },
63
+ });
64
+
65
+ return res.data.output;
66
+ }
67
+ }
package/src/index.ts CHANGED
@@ -1,3 +1 @@
1
- export * from "./client";
2
- export * from "./flows/helper";
3
- export * from "./types/flow";
1
+ export * from "./client";
package/tsconfig.json CHANGED
@@ -1,13 +1,13 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ES2020",
5
- "moduleResolution": "node",
6
- "outDir": "dist",
7
- "strict": true,
8
- "declaration": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true
11
- },
12
- "include": ["src"]
13
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ES2020",
5
+ "moduleResolution": "node",
6
+ "outDir": "dist",
7
+ "strict": true,
8
+ "declaration": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["src"]
13
+ }