@anuma/sdk 1.0.0 → 1.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.
Files changed (87) hide show
  1. package/README.md +54 -53
  2. package/dist/api/spec.cjs +30 -0
  3. package/dist/api/spec.d.mts +3 -0
  4. package/dist/api/spec.d.ts +3 -0
  5. package/dist/api/spec.mjs +12 -0
  6. package/dist/chunk-4ETHWSXJ.mjs +25 -0
  7. package/dist/client/index.cjs +2344 -0
  8. package/dist/client/index.d.mts +10368 -0
  9. package/dist/client/index.d.ts +10368 -0
  10. package/dist/client/index.mjs +2168 -0
  11. package/dist/clientConfig-WITO4T6L.mjs +12 -0
  12. package/dist/constants/index.cjs +30 -0
  13. package/dist/constants/index.d.mts +20 -0
  14. package/dist/constants/index.d.ts +20 -0
  15. package/dist/constants/index.mjs +5 -0
  16. package/dist/design/index.cjs +1523 -0
  17. package/dist/design/index.d.mts +561 -0
  18. package/dist/design/index.d.ts +561 -0
  19. package/dist/design/index.mjs +1468 -0
  20. package/dist/expo/chunk-3HZFU3PV.mjs +5283 -0
  21. package/dist/expo/chunk-DFVCS3QQ.mjs +246 -0
  22. package/dist/{react/chunk-MJJIYFAX.mjs → expo/chunk-GYKJOWEO.mjs} +13 -1
  23. package/dist/expo/chunk-Y7XT2VNQ.mjs +646 -0
  24. package/dist/expo/clientConfig-VPOGQRNP.mjs +12 -0
  25. package/dist/expo/consolidate-HEMQGOUD.mjs +131 -0
  26. package/dist/expo/index.cjs +16904 -6750
  27. package/dist/expo/index.d.mts +5755 -1474
  28. package/dist/expo/index.d.ts +5755 -1474
  29. package/dist/expo/index.mjs +9718 -6182
  30. package/dist/expo/recall-MCB3TVBW.mjs +8 -0
  31. package/dist/index.cjs +2992 -42
  32. package/dist/index.d.mts +7719 -1835
  33. package/dist/index.d.ts +7719 -1835
  34. package/dist/index.mjs +2859 -39
  35. package/dist/next/index.cjs +6 -2
  36. package/dist/next/index.d.mts +24 -1
  37. package/dist/next/index.d.ts +24 -1
  38. package/dist/next/index.mjs +6 -2
  39. package/dist/pii/transformers.cjs +126 -0
  40. package/dist/pii/transformers.d.mts +103 -0
  41. package/dist/pii/transformers.d.ts +103 -0
  42. package/dist/pii/transformers.mjs +90 -0
  43. package/dist/react/chunk-DFVCS3QQ.mjs +246 -0
  44. package/dist/react/chunk-ELDXIXRE.mjs +5656 -0
  45. package/dist/{expo/chunk-MJJIYFAX.mjs → react/chunk-GYKJOWEO.mjs} +13 -1
  46. package/dist/react/chunk-TP6CJZ25.mjs +645 -0
  47. package/dist/react/clientConfig-VPOGQRNP.mjs +12 -0
  48. package/dist/react/consolidate-IJH7LD2T.mjs +131 -0
  49. package/dist/react/index.cjs +25683 -11143
  50. package/dist/react/index.d.mts +7399 -1393
  51. package/dist/react/index.d.ts +7399 -1393
  52. package/dist/react/index.mjs +16709 -9196
  53. package/dist/react/recall-CSOMIT4H.mjs +8 -0
  54. package/dist/server/chunk-FMGZTVXQ.mjs +62 -0
  55. package/dist/server/chunk-G3DC7QBH.mjs +19457 -0
  56. package/dist/server/chunk-PXN5Q3MD.mjs +643 -0
  57. package/dist/server/chunk-RCCKRTBI.mjs +230 -0
  58. package/dist/server/clientConfig-GMADOBPK.mjs +12 -0
  59. package/dist/server/consolidate-A2ZIX5WF.mjs +131 -0
  60. package/dist/server/index.cjs +32161 -0
  61. package/dist/server/index.d.mts +7319 -0
  62. package/dist/server/index.d.ts +7319 -0
  63. package/dist/server/index.mjs +11217 -0
  64. package/dist/server/recall-LFYTTIIY.mjs +8 -0
  65. package/dist/tools/index.cjs +12682 -34
  66. package/dist/tools/index.d.mts +2733 -18
  67. package/dist/tools/index.d.ts +2733 -18
  68. package/dist/tools/index.mjs +12565 -33
  69. package/dist/utils/index.cjs +165 -0
  70. package/dist/utils/index.d.mts +14 -0
  71. package/dist/utils/index.d.ts +14 -0
  72. package/dist/utils/index.mjs +145 -0
  73. package/dist/vercel/index.d.mts +0 -3
  74. package/dist/vercel/index.d.ts +0 -3
  75. package/package.json +127 -16
  76. package/dist/expo/chunk-LJYAMK62.mjs +0 -25
  77. package/dist/expo/chunk-PJCZO4BQ.mjs +0 -25
  78. package/dist/expo/clientConfig-2MI4KULF.mjs +0 -10
  79. package/dist/expo/clientConfig-QDAXFL3W.mjs +0 -10
  80. package/dist/expo/clientConfig-R4IOW7I2.mjs +0 -10
  81. package/dist/react/chunk-LJYAMK62.mjs +0 -25
  82. package/dist/react/chunk-PJCZO4BQ.mjs +0 -25
  83. package/dist/react/clientConfig-2MI4KULF.mjs +0 -10
  84. package/dist/react/clientConfig-QDAXFL3W.mjs +0 -10
  85. package/dist/react/clientConfig-R4IOW7I2.mjs +0 -10
  86. package/dist/tools/chunk-KDFGY4SK.mjs +0 -13
  87. package/dist/tools/clientConfig-RMDOT5YM.mjs +0 -10
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ generateDocs: () => generateDocs,
24
+ normalizePath: () => normalizePath
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/utils/generate-docs.ts
29
+ var import_node_fs = require("fs");
30
+ var import_node_path = require("path");
31
+ var includeCodeRe = /^\{@includeCode\s+(\S+?)(?:#(\S+))?\s*\}$/;
32
+ var regionMarkerRe = /^\s*\/\/\s*#(?:region|endregion)\b.*$/;
33
+ function resolveGithubBase(cwd) {
34
+ const pkgPath = (0, import_node_path.join)(cwd, "package.json");
35
+ if (!(0, import_node_fs.existsSync)(pkgPath)) return "";
36
+ const pkg = JSON.parse((0, import_node_fs.readFileSync)(pkgPath, "utf8"));
37
+ const url = typeof pkg.repository === "string" ? pkg.repository : pkg.repository?.url;
38
+ if (!url) return "";
39
+ const cleaned = url.replace(/^git\+/, "").replace(/\.git$/, "");
40
+ return `${cleaned}/blob/main/`;
41
+ }
42
+ function generateDocs(options = {}) {
43
+ const cwd = process.cwd();
44
+ const srcDir = options.srcDir ?? "documents";
45
+ const outDir = options.outDir ?? "docs";
46
+ const githubBase = options.githubBase ?? resolveGithubBase(cwd);
47
+ const docsOut = (0, import_node_path.join)(outDir, srcDir);
48
+ let warnings = 0;
49
+ function warn(msg) {
50
+ console.warn(` warn: ${msg}`);
51
+ warnings++;
52
+ }
53
+ const fileCache = /* @__PURE__ */ new Map();
54
+ function readLines(filePath) {
55
+ if (fileCache.has(filePath)) return fileCache.get(filePath);
56
+ if (!(0, import_node_fs.existsSync)(filePath)) {
57
+ fileCache.set(filePath, null);
58
+ return null;
59
+ }
60
+ const lines = (0, import_node_fs.readFileSync)(filePath, "utf8").split("\n");
61
+ fileCache.set(filePath, lines);
62
+ return lines;
63
+ }
64
+ function escapeRegExp(s) {
65
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
66
+ }
67
+ function extractRegion(filePath, region) {
68
+ const lines = readLines(filePath);
69
+ if (!lines) {
70
+ warn(`source file not found: ${filePath}`);
71
+ return null;
72
+ }
73
+ if (!region) {
74
+ const content = lines.filter((l) => !regionMarkerRe.test(l));
75
+ return { content, startLine: 1, endLine: lines.length };
76
+ }
77
+ const escaped = escapeRegExp(region);
78
+ const startRe = new RegExp(`^//\\s*#region\\s+${escaped}$`);
79
+ const endRe = new RegExp(`^//\\s*#endregion\\s+${escaped}$`);
80
+ let start = -1;
81
+ for (let i = 0; i < lines.length; i++) {
82
+ const trimmed = lines[i].trim();
83
+ if (start === -1 && startRe.test(trimmed)) {
84
+ start = i;
85
+ } else if (start !== -1 && endRe.test(trimmed)) {
86
+ const content = lines.slice(start + 1, i).filter((l) => !regionMarkerRe.test(l));
87
+ return { content, startLine: start + 2, endLine: i };
88
+ }
89
+ }
90
+ warn(`region "${region}" not found in ${filePath}`);
91
+ return null;
92
+ }
93
+ function langFromExt(filePath) {
94
+ const ext = (0, import_node_path.extname)(filePath).slice(1);
95
+ return ext || "text";
96
+ }
97
+ function collectFiles(dir, ext) {
98
+ const files = [];
99
+ for (const entry of (0, import_node_fs.readdirSync)(dir, { withFileTypes: true })) {
100
+ const full = (0, import_node_path.join)(dir, entry.name);
101
+ if (entry.isDirectory()) files.push(...collectFiles(full, ext));
102
+ else if (entry.name.endsWith(ext)) files.push(full);
103
+ }
104
+ return files;
105
+ }
106
+ if ((0, import_node_fs.existsSync)(outDir)) (0, import_node_fs.rmSync)(outDir, { recursive: true });
107
+ for (const srcFile of collectFiles(srcDir, ".md")) {
108
+ const outFile = (0, import_node_path.join)(outDir, srcFile);
109
+ (0, import_node_fs.mkdirSync)((0, import_node_path.dirname)(outFile), { recursive: true });
110
+ const srcLines = (0, import_node_fs.readFileSync)(srcFile, "utf8").split("\n");
111
+ const out = [];
112
+ for (const line of srcLines) {
113
+ const m = line.match(includeCodeRe);
114
+ if (!m) {
115
+ out.push(line);
116
+ continue;
117
+ }
118
+ const refPath = (0, import_node_path.relative)(".", (0, import_node_path.resolve)((0, import_node_path.dirname)(srcFile), m[1]));
119
+ const region = m[2] || null;
120
+ const extracted = extractRegion(refPath, region);
121
+ if (!extracted) {
122
+ out.push(line);
123
+ continue;
124
+ }
125
+ const lang = langFromExt(refPath);
126
+ out.push(`\`\`\`${lang}`);
127
+ out.push(...extracted.content);
128
+ out.push("```");
129
+ if (githubBase) {
130
+ const fragment = region ? `#L${extracted.startLine}-L${extracted.endLine}` : "";
131
+ out.push(`
132
+ [${refPath}](${githubBase}${refPath}${fragment})`);
133
+ }
134
+ }
135
+ (0, import_node_fs.writeFileSync)(outFile, out.join("\n"));
136
+ }
137
+ if ((0, import_node_fs.existsSync)("README.md")) {
138
+ (0, import_node_fs.mkdirSync)(docsOut, { recursive: true });
139
+ (0, import_node_fs.copyFileSync)("README.md", (0, import_node_path.join)(docsOut, "index.md"));
140
+ }
141
+ for (const src of collectFiles(srcDir, "_meta.js")) {
142
+ const dest = (0, import_node_path.join)(outDir, src);
143
+ (0, import_node_fs.mkdirSync)((0, import_node_path.dirname)(dest), { recursive: true });
144
+ (0, import_node_fs.copyFileSync)(src, dest);
145
+ }
146
+ if (warnings > 0) {
147
+ console.warn(`
148
+ ${warnings} warning(s) during doc generation`);
149
+ process.exitCode = 1;
150
+ }
151
+ }
152
+
153
+ // src/utils/paths.ts
154
+ function normalizePath(p) {
155
+ return p.replace(/^\/+/, "").replace(/\/\/+/g, "/").split("/").reduce((acc, seg) => {
156
+ if (seg === "..") acc.pop();
157
+ else if (seg !== ".") acc.push(seg);
158
+ return acc;
159
+ }, []).join("/");
160
+ }
161
+ // Annotate the CommonJS export names for ESM import in node:
162
+ 0 && (module.exports = {
163
+ generateDocs,
164
+ normalizePath
165
+ });
@@ -0,0 +1,14 @@
1
+ interface GenerateDocsOptions {
2
+ /** Source directory containing markdown files (default: "documents") */
3
+ srcDir?: string;
4
+ /** Output directory for generated docs (default: "docs") */
5
+ outDir?: string;
6
+ /** GitHub base URL for source links (e.g. "https://github.com/org/repo/blob/main/") */
7
+ githubBase?: string;
8
+ }
9
+ declare function generateDocs(options?: GenerateDocsOptions): void;
10
+
11
+ /** Strip leading slash and collapse traversal segments so paths are always clean relative paths. */
12
+ declare function normalizePath(p: string): string;
13
+
14
+ export { generateDocs, normalizePath };
@@ -0,0 +1,14 @@
1
+ interface GenerateDocsOptions {
2
+ /** Source directory containing markdown files (default: "documents") */
3
+ srcDir?: string;
4
+ /** Output directory for generated docs (default: "docs") */
5
+ outDir?: string;
6
+ /** GitHub base URL for source links (e.g. "https://github.com/org/repo/blob/main/") */
7
+ githubBase?: string;
8
+ }
9
+ declare function generateDocs(options?: GenerateDocsOptions): void;
10
+
11
+ /** Strip leading slash and collapse traversal segments so paths are always clean relative paths. */
12
+ declare function normalizePath(p: string): string;
13
+
14
+ export { generateDocs, normalizePath };
@@ -0,0 +1,145 @@
1
+ // src/utils/generate-docs.ts
2
+ import {
3
+ copyFileSync,
4
+ existsSync,
5
+ mkdirSync,
6
+ readdirSync,
7
+ readFileSync,
8
+ rmSync,
9
+ writeFileSync
10
+ } from "fs";
11
+ import { dirname, extname, join, relative, resolve } from "path";
12
+ var includeCodeRe = /^\{@includeCode\s+(\S+?)(?:#(\S+))?\s*\}$/;
13
+ var regionMarkerRe = /^\s*\/\/\s*#(?:region|endregion)\b.*$/;
14
+ function resolveGithubBase(cwd) {
15
+ const pkgPath = join(cwd, "package.json");
16
+ if (!existsSync(pkgPath)) return "";
17
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
18
+ const url = typeof pkg.repository === "string" ? pkg.repository : pkg.repository?.url;
19
+ if (!url) return "";
20
+ const cleaned = url.replace(/^git\+/, "").replace(/\.git$/, "");
21
+ return `${cleaned}/blob/main/`;
22
+ }
23
+ function generateDocs(options = {}) {
24
+ const cwd = process.cwd();
25
+ const srcDir = options.srcDir ?? "documents";
26
+ const outDir = options.outDir ?? "docs";
27
+ const githubBase = options.githubBase ?? resolveGithubBase(cwd);
28
+ const docsOut = join(outDir, srcDir);
29
+ let warnings = 0;
30
+ function warn(msg) {
31
+ console.warn(` warn: ${msg}`);
32
+ warnings++;
33
+ }
34
+ const fileCache = /* @__PURE__ */ new Map();
35
+ function readLines(filePath) {
36
+ if (fileCache.has(filePath)) return fileCache.get(filePath);
37
+ if (!existsSync(filePath)) {
38
+ fileCache.set(filePath, null);
39
+ return null;
40
+ }
41
+ const lines = readFileSync(filePath, "utf8").split("\n");
42
+ fileCache.set(filePath, lines);
43
+ return lines;
44
+ }
45
+ function escapeRegExp(s) {
46
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
47
+ }
48
+ function extractRegion(filePath, region) {
49
+ const lines = readLines(filePath);
50
+ if (!lines) {
51
+ warn(`source file not found: ${filePath}`);
52
+ return null;
53
+ }
54
+ if (!region) {
55
+ const content = lines.filter((l) => !regionMarkerRe.test(l));
56
+ return { content, startLine: 1, endLine: lines.length };
57
+ }
58
+ const escaped = escapeRegExp(region);
59
+ const startRe = new RegExp(`^//\\s*#region\\s+${escaped}$`);
60
+ const endRe = new RegExp(`^//\\s*#endregion\\s+${escaped}$`);
61
+ let start = -1;
62
+ for (let i = 0; i < lines.length; i++) {
63
+ const trimmed = lines[i].trim();
64
+ if (start === -1 && startRe.test(trimmed)) {
65
+ start = i;
66
+ } else if (start !== -1 && endRe.test(trimmed)) {
67
+ const content = lines.slice(start + 1, i).filter((l) => !regionMarkerRe.test(l));
68
+ return { content, startLine: start + 2, endLine: i };
69
+ }
70
+ }
71
+ warn(`region "${region}" not found in ${filePath}`);
72
+ return null;
73
+ }
74
+ function langFromExt(filePath) {
75
+ const ext = extname(filePath).slice(1);
76
+ return ext || "text";
77
+ }
78
+ function collectFiles(dir, ext) {
79
+ const files = [];
80
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
81
+ const full = join(dir, entry.name);
82
+ if (entry.isDirectory()) files.push(...collectFiles(full, ext));
83
+ else if (entry.name.endsWith(ext)) files.push(full);
84
+ }
85
+ return files;
86
+ }
87
+ if (existsSync(outDir)) rmSync(outDir, { recursive: true });
88
+ for (const srcFile of collectFiles(srcDir, ".md")) {
89
+ const outFile = join(outDir, srcFile);
90
+ mkdirSync(dirname(outFile), { recursive: true });
91
+ const srcLines = readFileSync(srcFile, "utf8").split("\n");
92
+ const out = [];
93
+ for (const line of srcLines) {
94
+ const m = line.match(includeCodeRe);
95
+ if (!m) {
96
+ out.push(line);
97
+ continue;
98
+ }
99
+ const refPath = relative(".", resolve(dirname(srcFile), m[1]));
100
+ const region = m[2] || null;
101
+ const extracted = extractRegion(refPath, region);
102
+ if (!extracted) {
103
+ out.push(line);
104
+ continue;
105
+ }
106
+ const lang = langFromExt(refPath);
107
+ out.push(`\`\`\`${lang}`);
108
+ out.push(...extracted.content);
109
+ out.push("```");
110
+ if (githubBase) {
111
+ const fragment = region ? `#L${extracted.startLine}-L${extracted.endLine}` : "";
112
+ out.push(`
113
+ [${refPath}](${githubBase}${refPath}${fragment})`);
114
+ }
115
+ }
116
+ writeFileSync(outFile, out.join("\n"));
117
+ }
118
+ if (existsSync("README.md")) {
119
+ mkdirSync(docsOut, { recursive: true });
120
+ copyFileSync("README.md", join(docsOut, "index.md"));
121
+ }
122
+ for (const src of collectFiles(srcDir, "_meta.js")) {
123
+ const dest = join(outDir, src);
124
+ mkdirSync(dirname(dest), { recursive: true });
125
+ copyFileSync(src, dest);
126
+ }
127
+ if (warnings > 0) {
128
+ console.warn(`
129
+ ${warnings} warning(s) during doc generation`);
130
+ process.exitCode = 1;
131
+ }
132
+ }
133
+
134
+ // src/utils/paths.ts
135
+ function normalizePath(p) {
136
+ return p.replace(/^\/+/, "").replace(/\/\/+/g, "/").split("/").reduce((acc, seg) => {
137
+ if (seg === "..") acc.pop();
138
+ else if (seg !== ".") acc.push(seg);
139
+ return acc;
140
+ }, []).join("/");
141
+ }
142
+ export {
143
+ generateDocs,
144
+ normalizePath
145
+ };
@@ -1,8 +1,5 @@
1
1
  import { UIMessage } from 'ai';
2
2
 
3
- /**
4
- * Message is the generated message
5
- */
6
3
  type LlmapiMessage = {
7
4
  /**
8
5
  * Content is the message content
@@ -1,8 +1,5 @@
1
1
  import { UIMessage } from 'ai';
2
2
 
3
- /**
4
- * Message is the generated message
5
- */
6
3
  type LlmapiMessage = {
7
4
  /**
8
5
  * Content is the message content
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
+ "sideEffects": [
9
+ "./dist/polyfills/**"
10
+ ],
8
11
  "exports": {
9
12
  ".": {
10
13
  "types": "./dist/index.d.ts",
@@ -13,6 +16,13 @@
13
16
  "require": "./dist/index.cjs",
14
17
  "default": "./dist/index.cjs"
15
18
  },
19
+ "./constants": {
20
+ "types": "./dist/constants/index.d.ts",
21
+ "react-native": "./dist/constants/index.mjs",
22
+ "import": "./dist/constants/index.mjs",
23
+ "require": "./dist/constants/index.cjs",
24
+ "default": "./dist/constants/index.cjs"
25
+ },
16
26
  "./react": {
17
27
  "types": "./dist/react/index.d.ts",
18
28
  "react-native": "./dist/react/index.mjs",
@@ -20,6 +30,12 @@
20
30
  "require": "./dist/react/index.cjs",
21
31
  "default": "./dist/react/index.cjs"
22
32
  },
33
+ "./design": {
34
+ "types": "./dist/design/index.d.ts",
35
+ "import": "./dist/design/index.mjs",
36
+ "require": "./dist/design/index.cjs",
37
+ "default": "./dist/design/index.cjs"
38
+ },
23
39
  "./expo": {
24
40
  "types": "./dist/expo/index.d.ts",
25
41
  "react-native": "./dist/expo/index.mjs",
@@ -47,60 +63,134 @@
47
63
  "require": "./dist/next/index.cjs",
48
64
  "default": "./dist/next/index.cjs"
49
65
  },
66
+ "./client": {
67
+ "types": "./dist/client/index.d.ts",
68
+ "import": "./dist/client/index.mjs",
69
+ "require": "./dist/client/index.cjs",
70
+ "default": "./dist/client/index.cjs"
71
+ },
50
72
  "./tools": {
51
73
  "types": "./dist/tools/index.d.ts",
52
74
  "import": "./dist/tools/index.mjs",
53
75
  "require": "./dist/tools/index.cjs",
54
76
  "default": "./dist/tools/index.cjs"
77
+ },
78
+ "./server": {
79
+ "types": "./dist/server/index.d.ts",
80
+ "import": "./dist/server/index.mjs",
81
+ "require": "./dist/server/index.cjs",
82
+ "default": "./dist/server/index.cjs"
83
+ },
84
+ "./api/spec": {
85
+ "types": "./dist/api/spec.d.ts",
86
+ "import": "./dist/api/spec.mjs",
87
+ "require": "./dist/api/spec.cjs",
88
+ "default": "./dist/api/spec.cjs"
89
+ },
90
+ "./utils": {
91
+ "types": "./dist/utils/index.d.ts",
92
+ "import": "./dist/utils/index.mjs",
93
+ "require": "./dist/utils/index.cjs",
94
+ "default": "./dist/utils/index.cjs"
95
+ },
96
+ "./pii/transformers": {
97
+ "types": "./dist/pii/transformers.d.ts",
98
+ "import": "./dist/pii/transformers.mjs",
99
+ "require": "./dist/pii/transformers.cjs",
100
+ "default": "./dist/pii/transformers.cjs"
55
101
  }
56
102
  },
57
103
  "files": [
58
104
  "dist"
59
105
  ],
60
106
  "scripts": {
61
- "spec": "openapi-ts",
107
+ "spec": "openapi-ts && node scripts/patch-generated-client.mjs",
62
108
  "test": "vitest run",
109
+ "test:browser": "vitest run --config vitest.browser.config.mts",
63
110
  "build": "tsup",
64
111
  "prepublishOnly": "pnpm build",
65
112
  "docs": "typedoc",
66
- "generate": "pnpm run spec && pnpm run docs",
67
- "eval:memory": "tsx test/memory",
113
+ "generate": "pnpm run spec && pnpm run docs && tsx scripts/generate-schema-docs.ts",
114
+ "e2e:tools": "vitest run --config vitest.e2e.config.mts",
115
+ "e2e:compare": "tsx scripts/compare-app-gen-runs.ts",
116
+ "perf:slides": "vitest run --config vitest.perf.config.mts",
117
+ "eval:engine": "tsx test/memory/longmemeval.ts --strategy engine",
118
+ "eval:vault": "tsx test/memory/longmemeval.ts --strategy vault",
68
119
  "eval:longmemeval": "tsx test/memory/longmemeval.ts",
69
- "eval:longmemeval:preload": "tsx test/memory/longmemeval.ts --preload"
120
+ "eval:longmemeval:preload": "tsx test/memory/longmemeval.ts --preload",
121
+ "eval:vault-search": "tsx test/memory/src/vault/benchmark.test.ts",
122
+ "update-model-apis": "tsx scripts/update-model-apis.ts",
123
+ "api-report": "node scripts/api-extractor-run.mjs",
124
+ "api-report:update": "node scripts/api-extractor-run.mjs --local",
125
+ "lint": "eslint .",
126
+ "lint:fix": "eslint . --fix",
127
+ "format": "prettier --write .",
128
+ "format:check": "prettier --check .",
129
+ "typecheck": "tsc --noEmit",
130
+ "knip": "knip",
131
+ "check-exports": "publint && attw --pack --ignore-rules no-resolution false-cjs",
132
+ "check": "pnpm run lint && pnpm run knip && pnpm run format && pnpm run generate",
133
+ "eval:extraction": "tsx test/memory/src/extraction/benchmark.test.ts"
70
134
  },
71
135
  "repository": {
72
136
  "type": "git",
73
- "url": "git+https://github.com/zeta-chain/ai-sdk.git"
137
+ "url": "git+https://github.com/anuma-ai/sdk.git"
74
138
  },
75
139
  "keywords": [],
76
140
  "author": "",
77
141
  "license": "ISC",
78
142
  "bugs": {
79
- "url": "https://github.com/zeta-chain/ai-sdk/issues"
143
+ "url": "https://github.com/anuma-ai/sdk/issues"
80
144
  },
81
- "homepage": "https://github.com/zeta-chain/ai-sdk#readme",
145
+ "homepage": "https://github.com/anuma-ai/sdk#readme",
146
+ "packageManager": "pnpm@10.23.0",
82
147
  "dependencies": {
83
- "@anuma/portal": "1.0.0",
84
- "ai": "5.0.93",
148
+ "@anuma/portal": "1.0.0-next.20260708031058",
149
+ "@babel/parser": "^7.29.2",
150
+ "@babel/types": "^7.29.0",
151
+ "ai": "6.0.202",
152
+ "exceljs": "^4.4.0",
153
+ "html2canvas": "^1.4.1",
154
+ "jsonrepair": "^3.14.0",
155
+ "jspdf": "^4.2.1",
85
156
  "jszip": "^3.10.1",
86
157
  "mammoth": "^1.11.0",
158
+ "marked": "^15.0.0",
87
159
  "pdfjs-dist": "^4.10.38",
88
160
  "tesseract.js": "^6.0.1",
89
- "uuid": "^13.0.0",
90
- "xlsx": "^0.18.5"
161
+ "uuid": "^14.0.0"
91
162
  },
92
163
  "devDependencies": {
164
+ "@arethetypeswrong/cli": "^0.18.2",
165
+ "@eslint/js": "^10.0.1",
93
166
  "@hey-api/openapi-ts": "0.87.2",
167
+ "@huggingface/transformers": "^3.0.0",
168
+ "@microsoft/api-extractor": "^7.57.1",
94
169
  "@nozbe/watermelondb": "^0.28.0",
95
170
  "@privy-io/react-auth": "^3.7.0",
171
+ "@testcontainers/postgresql": "^11.14.0",
96
172
  "@testing-library/react": "^16.3.0",
97
173
  "@types/node": "^25.0.3",
174
+ "@types/pg": "^8.20.0",
98
175
  "@types/react": "^19.2.6",
176
+ "@types/react-dom": "^19.2.3",
177
+ "@vitest/coverage-v8": "4.1.8",
178
+ "dependency-cruiser": "^17.3.8",
99
179
  "dotenv": "^17.2.3",
180
+ "eslint": "^10.0.1",
181
+ "eslint-plugin-react": "^7.37.5",
182
+ "eslint-plugin-react-hooks": "^7.0.1",
183
+ "eslint-plugin-simple-import-sort": "^12.1.1",
100
184
  "happy-dom": "^20.0.11",
185
+ "knip": "^5.85.0",
186
+ "pg": "^8.20.0",
101
187
  "playwright": "^1.57.0",
188
+ "prettier": "^3.8.1",
189
+ "publint": "^0.3.17",
102
190
  "react": "^19.2.1",
103
191
  "react-dom": "^19.2.1",
192
+ "recharts": "^2.15.4",
193
+ "table": "^6.9.0",
104
194
  "tsup": "^8.5.1",
105
195
  "tsx": "^4.21.0",
106
196
  "typedoc": "^0.28.14",
@@ -108,8 +198,9 @@
108
198
  "typedoc-plugin-markdown": "^4.9.0",
109
199
  "typedoc-plugin-remark": "^2.0.1",
110
200
  "typescript": "^5.9.3",
201
+ "typescript-eslint": "^8.56.0",
111
202
  "unist-util-visit": "^5.0.0",
112
- "vitest": "^4.0.14"
203
+ "vitest": "^4.1.8"
113
204
  },
114
205
  "peerDependencies": {
115
206
  "@huggingface/transformers": "^3.0.0",
@@ -117,7 +208,8 @@
117
208
  "@privy-io/react-auth": "^3.7.0",
118
209
  "react": "^18.0.0 || ^19.0.0",
119
210
  "react-dom": "^18.0.0 || ^19.0.0",
120
- "react-native": ">=0.70.0"
211
+ "react-native": ">=0.70.0",
212
+ "recharts": "^2.0.0"
121
213
  },
122
214
  "peerDependenciesMeta": {
123
215
  "@huggingface/transformers": {
@@ -134,16 +226,35 @@
134
226
  },
135
227
  "@privy-io/react-auth": {
136
228
  "optional": true
229
+ },
230
+ "recharts": {
231
+ "optional": true
137
232
  }
138
233
  },
139
234
  "pnpm": {
140
235
  "overrides": {
141
236
  "react": ">=19.0.1 <19.1.0 || >=19.1.2 <19.2.0 || >=19.2.1",
142
- "react-dom": ">=19.0.1 <19.1.0 || >=19.1.2 <19.2.0 || >=19.2.1"
237
+ "react-dom": ">=19.0.1 <19.1.0 || >=19.1.2 <19.2.0 || >=19.2.1",
238
+ "tar": ">=7.5.11",
239
+ "picomatch": ">=2.3.2 <3.0.0 || >=4.0.4",
240
+ "@xmldom/xmldom": ">=0.8.13 <0.9.0",
241
+ "protobufjs": ">=7.6.1 <8.0.0",
242
+ "tmp": ">=0.2.7",
243
+ "ws@6": ">=6.2.4 <7.0.0",
244
+ "ws@7": ">=7.5.11 <8.0.0",
245
+ "shell-quote": ">=1.8.4",
246
+ "axios": ">=1.16.0 <2.0.0",
247
+ "hono": ">=4.12.21 <5.0.0",
248
+ "js-cookie": ">=3.0.7 <4.0.0",
249
+ "postcss": ">=8.5.10 <9.0.0",
250
+ "dompurify": ">=3.4.0 <4.0.0",
251
+ "lodash": ">=4.18.0 <5.0.0",
252
+ "minimatch@10": ">=10.2.3 <11.0.0",
253
+ "uuid@<11.1.1": ">=11.1.1 <12.0.0"
143
254
  },
144
255
  "patchedDependencies": {
145
256
  "tesseract.js@6.0.1": "patches/tesseract.js@6.0.1.patch",
146
257
  "pdfjs-dist@4.10.38": "patches/pdfjs-dist@4.10.38.patch"
147
258
  }
148
259
  }
149
- }
260
+ }
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result) __defProp(target, key, result);
9
- return result;
10
- };
11
-
12
- // src/clientConfig.ts
13
- var BASE_URL = "https://portal.anuma-dev.ai";
14
- var MCP_R2_DOMAIN = "ai-image-mcp-images.4cf0e0ea50b97e72386fcf2f92a2d4e8.r2.cloudflarestorage.com";
15
- var createClientConfig = (config) => ({
16
- ...config,
17
- baseUrl: BASE_URL
18
- });
19
-
20
- export {
21
- __decorateClass,
22
- BASE_URL,
23
- MCP_R2_DOMAIN,
24
- createClientConfig
25
- };
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result) __defProp(target, key, result);
9
- return result;
10
- };
11
-
12
- // src/clientConfig.ts
13
- var BASE_URL = "https://ai-portal-dev.zetachain.com";
14
- var MCP_R2_DOMAIN = "4cf0e0ea50b97e72386fcf2f92a2d4e8.r2.cloudflarestorage.com";
15
- var createClientConfig = (config) => ({
16
- ...config,
17
- baseUrl: BASE_URL
18
- });
19
-
20
- export {
21
- __decorateClass,
22
- BASE_URL,
23
- MCP_R2_DOMAIN,
24
- createClientConfig
25
- };
@@ -1,10 +0,0 @@
1
- import {
2
- BASE_URL,
3
- MCP_R2_DOMAIN,
4
- createClientConfig
5
- } from "./chunk-PJCZO4BQ.mjs";
6
- export {
7
- BASE_URL,
8
- MCP_R2_DOMAIN,
9
- createClientConfig
10
- };
@@ -1,10 +0,0 @@
1
- import {
2
- BASE_URL,
3
- MCP_R2_DOMAIN,
4
- createClientConfig
5
- } from "./chunk-LJYAMK62.mjs";
6
- export {
7
- BASE_URL,
8
- MCP_R2_DOMAIN,
9
- createClientConfig
10
- };