@keywordsai/keywordsai-sdk 0.0.5 → 0.0.7

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.
@@ -1 +1 @@
1
- export * from "./log";
1
+ export * from "./log.js";
@@ -1,2 +1,2 @@
1
- export * from "./log";
1
+ export * from "./log.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,2 +1,17 @@
1
- import { LogType } from "../types/logTypes";
2
- export declare const VERCEL_SPAN_TO_KEYWORDS_LOG_TYPE: Record<string, LogType>;
1
+ export declare enum KeywordsLogType {
2
+ TEXT = "text",
3
+ RESPONSE = "response",
4
+ EMBEDDING = "embedding",
5
+ TRANSCRIPTION = "transcription",
6
+ SPEECH = "speech",
7
+ WORKFLOW = "workflow",
8
+ TASK = "task",
9
+ TOOL = "tool",
10
+ AGENT = "agent",
11
+ HANDOFF = "handoff",
12
+ GUARDRAIL = "guardrail",
13
+ FUNCTION = "function",
14
+ CUSTOM = "custom",
15
+ GENERATION = "generation",
16
+ UNKNOWN = "unknown"
17
+ }
@@ -1,36 +1,21 @@
1
- export const VERCEL_SPAN_TO_KEYWORDS_LOG_TYPE = {
2
- // Text generation spans
3
- "ai.generateText": "text",
4
- "ai.generateText.doGenerate": "text",
5
- "ai.streamText": "text",
6
- "ai.streamText.doStream": "text",
7
- // Object generation spans
8
- "ai.generateObject": "text",
9
- "ai.generateObject.doGenerate": "text",
10
- "ai.streamObject": "text",
11
- "ai.streamObject.doStream": "text",
12
- // Embedding spans
13
- "ai.embed": "embedding",
14
- "ai.embed.doEmbed": "embedding",
15
- "ai.embedMany": "embedding",
16
- "ai.embedMany.doEmbed": "embedding",
17
- // Tool call spans
18
- "ai.toolCall": "tool",
19
- // Stream events
20
- "ai.stream.firstChunk": "text",
21
- // Agents and workflows
22
- "ai.agent": "agent",
23
- "ai.workflow": "workflow",
24
- "ai.agent.run": "agent",
25
- "ai.agent.step": "task",
26
- // Functions and handoffs
27
- "ai.function": "function",
28
- "ai.handoff": "handoff",
29
- // Other spans that might appear
30
- "ai.transcript": "transcription",
31
- "ai.speech": "speech",
32
- "ai.response": "response",
33
- // Default to UNKNOWN for unrecognized spans
34
- default: "unknown",
35
- };
1
+ // Mapping from Vercel AI SDK span types to KeywordsAI log types
2
+ // Define KeywordsAI log type enum
3
+ export var KeywordsLogType;
4
+ (function (KeywordsLogType) {
5
+ KeywordsLogType["TEXT"] = "text";
6
+ KeywordsLogType["RESPONSE"] = "response";
7
+ KeywordsLogType["EMBEDDING"] = "embedding";
8
+ KeywordsLogType["TRANSCRIPTION"] = "transcription";
9
+ KeywordsLogType["SPEECH"] = "speech";
10
+ KeywordsLogType["WORKFLOW"] = "workflow";
11
+ KeywordsLogType["TASK"] = "task";
12
+ KeywordsLogType["TOOL"] = "tool";
13
+ KeywordsLogType["AGENT"] = "agent";
14
+ KeywordsLogType["HANDOFF"] = "handoff";
15
+ KeywordsLogType["GUARDRAIL"] = "guardrail";
16
+ KeywordsLogType["FUNCTION"] = "function";
17
+ KeywordsLogType["CUSTOM"] = "custom";
18
+ KeywordsLogType["GENERATION"] = "generation";
19
+ KeywordsLogType["UNKNOWN"] = "unknown";
20
+ })(KeywordsLogType || (KeywordsLogType = {}));
36
21
  //# sourceMappingURL=log.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/constants/log.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gCAAgC,GAA4B;IACvE,wBAAwB;IACxB,iBAAiB,EAAE,MAAM;IACzB,4BAA4B,EAAE,MAAM;IACpC,eAAe,EAAE,MAAM;IACvB,wBAAwB,EAAE,MAAM;IAEhC,0BAA0B;IAC1B,mBAAmB,EAAE,MAAM;IAC3B,8BAA8B,EAAE,MAAM;IACtC,iBAAiB,EAAE,MAAM;IACzB,0BAA0B,EAAE,MAAM;IAElC,kBAAkB;IAClB,UAAU,EAAE,WAAW;IACvB,kBAAkB,EAAE,WAAW;IAC/B,cAAc,EAAE,WAAW;IAC3B,sBAAsB,EAAE,WAAW;IAEnC,kBAAkB;IAClB,aAAa,EAAE,MAAM;IAErB,gBAAgB;IAChB,sBAAsB,EAAE,MAAM;IAE9B,uBAAuB;IACvB,UAAU,EAAE,OAAO;IACnB,aAAa,EAAE,UAAU;IACzB,cAAc,EAAE,OAAO;IACvB,eAAe,EAAE,MAAM;IAEvB,yBAAyB;IACzB,aAAa,EAAE,UAAU;IACzB,YAAY,EAAE,SAAS;IAEvB,gCAAgC;IAChC,eAAe,EAAE,eAAe;IAChC,WAAW,EAAE,QAAQ;IACrB,aAAa,EAAE,UAAU;IAEzB,4CAA4C;IAC5C,OAAO,EAAE,SAAS;CACnB,CAAC"}
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/constants/log.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,kCAAkC;AAClC,MAAM,CAAN,IAAY,eAgBX;AAhBD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,0CAAuB,CAAA;IACvB,kDAA+B,CAAA;IAC/B,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,4CAAyB,CAAA;IACzB,sCAAmB,CAAA;AACrB,CAAC,EAhBW,eAAe,KAAf,eAAe,QAgB1B"}
@@ -1,6 +1,6 @@
1
- export * from "./decoratorTypes";
2
- export * from "./clientTypes";
3
- export * from "./spanTypes";
4
- export * from "./baseTypes";
5
- export * from "./logTypes";
6
- export * from "./tracingTypes";
1
+ export * from "./decoratorTypes.js";
2
+ export * from "./clientTypes.js";
3
+ export * from "./spanTypes.js";
4
+ export * from "./baseTypes.js";
5
+ export * from "./logTypes.js";
6
+ export * from "./tracingTypes.js";
@@ -1,7 +1,7 @@
1
- export * from "./decoratorTypes";
2
- export * from "./clientTypes";
3
- export * from "./spanTypes";
4
- export * from "./baseTypes";
5
- export * from "./logTypes";
6
- export * from "./tracingTypes";
1
+ export * from "./decoratorTypes.js";
2
+ export * from "./clientTypes.js";
3
+ export * from "./spanTypes.js";
4
+ export * from "./baseTypes.js";
5
+ export * from "./logTypes.js";
6
+ export * from "./tracingTypes.js";
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@keywordsai/keywordsai-sdk",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "description": "KeywordsAI typing SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,8 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "tsc",
20
20
  "version": "npm version",
21
- "publish": "npm publish",
22
- "release": "npm version patch && npm publish"
21
+ "publish": "yarn npm publish"
23
22
  },
24
23
  "packageManager": "yarn@4.6.0",
25
24
  "dependencies": {
@@ -31,4 +30,4 @@
31
30
  "devDependencies": {
32
31
  "@types/node": "^22.15.29"
33
32
  }
34
- }
33
+ }