@keywordsai/keywordsai-sdk 0.0.6 → 0.0.8

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 @@
1
+ export * from "./log.js";
@@ -1,2 +1,2 @@
1
- "use strict";
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":""}
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"}
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from "./types";
1
+ export * from "./types/index.js";
2
+ export * from "./constants/index.js";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  // KeywordsAI SDK - Main Entry Point
2
- export * from "./types";
2
+ export * from "./types/index.js";
3
+ export * from "./constants/index.js";
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,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.6",
4
+ "version": "0.0.8",
5
5
  "description": "KeywordsAI typing SDK",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,7 +18,8 @@
18
18
  "scripts": {
19
19
  "build": "tsc",
20
20
  "version": "npm version",
21
- "publish": "yarn npm publish"
21
+ "publish": "yarn npm publish",
22
+ "release": "yarn build &&yarn version patch && yarn publish"
22
23
  },
23
24
  "packageManager": "yarn@4.6.0",
24
25
  "dependencies": {