polywise 0.0.2 → 0.0.3

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/auth.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Auth, BetterAuthOptions } from 'better-auth';
2
- declare const auth_options: {
2
+ declare const getAuthOptions: () => {
3
3
  database: (options: BetterAuthOptions) => import("better-auth").DBAdapter<BetterAuthOptions>;
4
4
  emailAndPassword: {
5
5
  enabled: true;
@@ -218,7 +218,7 @@ declare const auth_options: {
218
218
  };
219
219
  }];
220
220
  };
221
- type AuthInstance = Auth<typeof auth_options>;
221
+ type AuthInstance = Auth<ReturnType<typeof getAuthOptions>>;
222
222
  export declare const getAuth: () => AuthInstance;
223
223
  export declare const getAuthTrustedOrigins: () => string[];
224
224
  export declare const getConfiguredAuthUser: () => Promise<{
@@ -499,7 +499,7 @@ CREATE INDEX `article_source_idx` ON `article` (`source`);--> statement-breakpoi
499
499
  CREATE INDEX `article_is_pipelined_idx` ON `article` (`is_pipelined`);--> statement-breakpoint
500
500
  CREATE INDEX `article_created_at_idx` ON `article` (`created_at`);--> statement-breakpoint
501
501
  CREATE INDEX `article_updated_at_idx` ON `article` (`updated_at`);--> statement-breakpoint
502
- CREATE UNIQUE INDEX `article_hash_idx` ON `article` (`hash`);--> statement-breakpoint
502
+ CREATE UNIQUE INDEX `article_hash_idx` ON `article` (`scope_type`,`scope_id`,`hash`);--> statement-breakpoint
503
503
  CREATE INDEX `chunk_article_id_idx` ON `chunk` (`article_id`);--> statement-breakpoint
504
504
  CREATE INDEX `chunk_created_at_idx` ON `chunk` (`created_at`);--> statement-breakpoint
505
505
  CREATE INDEX `document_is_pipelined_idx` ON `document` (`is_pipelined`);--> statement-breakpoint
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "7",
3
3
  "dialect": "sqlite",
4
- "id": "bfe95a60-21ca-44dd-8ce7-0633859eec94",
4
+ "id": "da04f2a5-73ff-4b62-b7e8-936ee99a8a55",
5
5
  "prevIds": [
6
6
  "00000000-0000-0000-0000-000000000000"
7
7
  ],
@@ -4446,6 +4446,14 @@
4446
4446
  },
4447
4447
  {
4448
4448
  "columns": [
4449
+ {
4450
+ "value": "scope_type",
4451
+ "isExpression": false
4452
+ },
4453
+ {
4454
+ "value": "scope_id",
4455
+ "isExpression": false
4456
+ },
4449
4457
  {
4450
4458
  "value": "hash",
4451
4459
  "isExpression": false
package/package.json CHANGED
@@ -1,167 +1,184 @@
1
1
  {
2
- "name": "polywise",
3
- "version": "0.0.2",
4
- "homepage": "https://polywise.io",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/MatrixAges/polywise.git"
8
- },
9
- "type": "module",
10
- "main": "./dist/index.js",
11
- "sideEffects": false,
12
- "exports": {
13
- ".": {
14
- "types": "./dist/src/index.d.ts",
15
- "import": "./dist/index.js",
16
- "default": "./dist/index.js"
17
- }
18
- },
19
- "bin": {
20
- "polywise": "./dist/cli.js"
21
- },
22
- "files": [
23
- "dist",
24
- "./package.json",
25
- "./README.md",
26
- "./LICENSE"
27
- ],
28
- "scripts": {
29
- "build:standalone": "npm run rebuild && cross-env NODE_ENV=production rslib build && bun ./scripts/copyAppDist.ts",
30
- "build:electron": "cross-env NODE_ENV=production rslib build",
31
- "build:watch": "cross-env NODE_ENV=development rslib build --watch",
32
- "cli": "node ./dist/cli.js",
33
- "copy:app-dist": "bun ./scripts/copyAppDist.ts",
34
- "start": "node ./dist/index.js",
35
- "start:watch": "delay 600ms && cross-env NODE_ENV=development node --watch ./dist/index.js",
36
- "dev": "concurrently -c \"cyan,magenta\" \"npm run build:watch\" \"npm run start:watch\"",
37
- "test": "rstest run $TEST_FILE",
38
- "sql": "drizzle-kit generate",
39
- "auth:sql": "pnpx auth generate --adapter drizzle",
40
- "auth:migrate": "pnpx auth migrate",
41
- "studio": "drizzle-kit studio",
42
- "rebuild": "cross-env CI=true npm rebuild better-sqlite3 bufferutil lmdb node-llama-cpp simsimd sqlite-vec utf-8-validate @node-rs/jieba @node-rs/xxhash",
43
- "pub": "npm publish --access public --no-git-checks"
44
- },
45
- "dependencies": {
46
- "@abraham/reflection": "catalog:",
47
- "@ai-sdk/amazon-bedrock": "^4.0.108",
48
- "@ai-sdk/anthropic": "^3.0.79",
49
- "@ai-sdk/azure": "^3.0.66",
50
- "@ai-sdk/cerebras": "^2.0.54",
51
- "@ai-sdk/cohere": "^3.0.36",
52
- "@ai-sdk/deepinfra": "^2.0.52",
53
- "@ai-sdk/deepseek": "^2.0.35",
54
- "@ai-sdk/fireworks": "^2.0.53",
55
- "@ai-sdk/google": "^3.0.79",
56
- "@ai-sdk/groq": "^3.0.39",
57
- "@ai-sdk/mcp": "^1.0.43",
58
- "@ai-sdk/mistral": "^3.0.37",
59
- "@ai-sdk/moonshotai": "^2.0.23",
60
- "@ai-sdk/open-responses": "^1.0.16",
61
- "@ai-sdk/openai": "catalog:",
62
- "@ai-sdk/openai-compatible": "^2.0.48",
63
- "@ai-sdk/perplexity": "^3.0.33",
64
- "@ai-sdk/provider-utils": "catalog:",
65
- "@ai-sdk/togetherai": "^2.0.53",
66
- "@ai-sdk/vercel": "^2.0.50",
67
- "@ai-sdk/xai": "^3.0.92",
68
- "@better-auth/drizzle-adapter": "^1.6.11",
69
- "@chonkiejs/core": "^0.0.10",
70
- "@drizzle-team/brocli": "^0.12.0",
71
- "@hono/node-server": "catalog:",
72
- "@hono/trpc-server": "catalog:",
73
- "@hono/zod-validator": "^0.8.0",
74
- "@larksuiteoapi/node-sdk": "^1.65.0",
75
- "@node-rs/jieba": "^2.0.1",
76
- "@node-rs/xxhash": "^1.7.6",
77
- "@openrouter/ai-sdk-provider": "^2.9.0",
78
- "@trpc/server": "catalog:",
79
- "@types/diff": "^8.0.0",
80
- "a2a-ai-provider": "0.4.0-alpha.2",
81
- "ai": "catalog:",
82
- "ai-sdk-ollama": "^3.8.4",
83
- "ansis": "catalog:",
84
- "archiver": "^8.0.0",
85
- "atomically": "^2.1.1",
86
- "await-to-js": "catalog:",
87
- "bash-tool": "^1.3.16",
88
- "better-auth": "^1.6.11",
89
- "better-sqlite3": "^12.10.0",
90
- "bufferutil": "^4.1.0",
91
- "croner": "^10.0.1",
92
- "dayjs": "catalog:",
93
- "diff": "^9.0.0",
94
- "drizzle-kit": "1.0.0-rc.4-5d5b77c",
95
- "drizzle-orm": "1.0.0-rc.4-5d5b77c",
96
- "drizzle-zod": "^0.8.3",
97
- "es-toolkit": "catalog:",
98
- "evlog": "^2.18.1",
99
- "fastq": "^1.20.1",
100
- "fs-extra": "catalog:",
101
- "globby": "catalog:",
102
- "hono": "catalog:",
103
- "jina-ai-provider": "^1.0.0",
104
- "just-bash": "2.14.0",
105
- "jws": "^4.0.1",
106
- "lmdb": "^3.5.4",
107
- "mammoth": "^1.12.0",
108
- "minimatch": "^10.2.5",
109
- "nice-try": "^4.0.2",
110
- "node-llama-cpp": "^3.18.1",
111
- "ofetch": "catalog:",
112
- "pdf2pic": "^3.2.0",
113
- "remark": "^15.0.1",
114
- "remark-gfm": "^4.0.1",
115
- "remark-math": "^6.0.0",
116
- "ripgrep": "^0.3.1",
117
- "safer-buffer": "^2.1.2",
118
- "sentence-splitter": "^5.0.1",
119
- "shelljs": "^0.10.0",
120
- "simsimd": "^6.5.5",
121
- "sqlite-vec": "^0.1.9",
122
- "stk": "workspace:*",
123
- "stopword": "^3.1.5",
124
- "superjson": "^2.2.6",
125
- "tinypool": "^2.1.0",
126
- "trpc-to-openapi": "^3.3.0",
127
- "ts-pattern": "^5.9.0",
128
- "tslib": "catalog:",
129
- "tsyringe": "catalog:",
130
- "turndown": "^7.2.4",
131
- "unzipper": "^0.12.3",
132
- "utf-8-validate": "^6.0.6",
133
- "uuid": "catalog:",
134
- "vercel-minimax-ai-provider": "^0.0.2",
135
- "watchpack": "catalog:",
136
- "ws": "^8.21.0",
137
- "zod-openapi": "^5.4.6",
138
- "zhipu-ai-provider": "^0.3.1",
139
- "zod": "catalog:"
140
- },
141
- "devDependencies": {
142
- "@rslib/core": "catalog:",
143
- "@rstest/core": "catalog:",
144
- "@types/archiver": "^7.0.0",
145
- "@types/better-sqlite3": "^7.6.13",
146
- "@types/fs-extra": "catalog:",
147
- "@types/mdast": "^4.0.4",
148
- "@types/nice-try": "^2.1.2",
149
- "@types/node": "catalog:",
150
- "@types/shelljs": "^0.10.0",
151
- "@types/stopword": "^2.0.3",
152
- "@types/turndown": "^5.0.6",
153
- "@types/unzipper": "^0.10.11",
154
- "@types/watchpack": "catalog:",
155
- "@types/ws": "^8.18.1",
156
- "bun": "catalog:",
157
- "bun-types": "catalog:",
158
- "concurrently": "^9.2.1",
159
- "cross-env": "catalog:",
160
- "deepmerge-ts": "catalog:",
161
- "delay-cli": "catalog:",
162
- "drizzle-seed": "^0.3.1",
163
- "picocolors": "^1.1.1",
164
- "reflect-metadata": "catalog:",
165
- "type-fest": "catalog:"
166
- }
2
+ "name": "polywise",
3
+ "version": "0.0.3",
4
+ "license": "MIT",
5
+ "homepage": "https://polywise.io",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/MatrixAges/polywise.git"
9
+ },
10
+ "keywords": [
11
+ "agent",
12
+ "decision",
13
+ "workflow",
14
+ "database",
15
+ "ai",
16
+ "memory",
17
+ "self-hosted",
18
+ "assistant",
19
+ "twin",
20
+ "rag",
21
+ "decision-system",
22
+ "graph-rag",
23
+ "polywise",
24
+ "llm-wiki"
25
+ ],
26
+ "type": "module",
27
+ "main": "./dist/index.js",
28
+ "sideEffects": false,
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/src/index.d.ts",
32
+ "import": "./dist/index.js",
33
+ "default": "./dist/index.js"
34
+ }
35
+ },
36
+ "bin": {
37
+ "polywise": "./dist/cli.js"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "./package.json",
42
+ "./README.md",
43
+ "./LICENSE"
44
+ ],
45
+ "scripts": {
46
+ "build:standalone": "npm run rebuild && cross-env NODE_ENV=production rslib build && bun ./scripts/copyAppDist.ts",
47
+ "build:electron": "cross-env NODE_ENV=production rslib build",
48
+ "build:watch": "cross-env NODE_ENV=development rslib build --watch",
49
+ "cli": "node ./dist/cli.js",
50
+ "copy:app-dist": "bun ./scripts/copyAppDist.ts",
51
+ "start": "node ./dist/index.js",
52
+ "start:watch": "delay 600ms && cross-env NODE_ENV=development node --watch ./dist/index.js",
53
+ "dev": "concurrently -c \"cyan,magenta\" \"npm run build:watch\" \"npm run start:watch\"",
54
+ "test": "rstest run $TEST_FILE",
55
+ "sql": "drizzle-kit generate",
56
+ "auth:sql": "pnpx auth generate --adapter drizzle",
57
+ "auth:migrate": "pnpx auth migrate",
58
+ "studio": "drizzle-kit studio",
59
+ "rebuild": "cross-env CI=true npm rebuild better-sqlite3 bufferutil lmdb node-llama-cpp simsimd sqlite-vec utf-8-validate @node-rs/jieba @node-rs/xxhash",
60
+ "pub": "npm publish --access public --no-git-checks"
61
+ },
62
+ "dependencies": {
63
+ "@abraham/reflection": "catalog:",
64
+ "@ai-sdk/amazon-bedrock": "^4.0.108",
65
+ "@ai-sdk/anthropic": "^3.0.79",
66
+ "@ai-sdk/azure": "^3.0.66",
67
+ "@ai-sdk/cerebras": "^2.0.54",
68
+ "@ai-sdk/cohere": "^3.0.36",
69
+ "@ai-sdk/deepinfra": "^2.0.52",
70
+ "@ai-sdk/deepseek": "^2.0.35",
71
+ "@ai-sdk/fireworks": "^2.0.53",
72
+ "@ai-sdk/google": "^3.0.79",
73
+ "@ai-sdk/groq": "^3.0.39",
74
+ "@ai-sdk/mcp": "^1.0.43",
75
+ "@ai-sdk/mistral": "^3.0.37",
76
+ "@ai-sdk/moonshotai": "^2.0.23",
77
+ "@ai-sdk/open-responses": "^1.0.16",
78
+ "@ai-sdk/openai": "catalog:",
79
+ "@ai-sdk/openai-compatible": "^2.0.48",
80
+ "@ai-sdk/perplexity": "^3.0.33",
81
+ "@ai-sdk/provider-utils": "catalog:",
82
+ "@ai-sdk/togetherai": "^2.0.53",
83
+ "@ai-sdk/vercel": "^2.0.50",
84
+ "@ai-sdk/xai": "^3.0.92",
85
+ "@better-auth/drizzle-adapter": "^1.6.11",
86
+ "@chonkiejs/core": "^0.0.10",
87
+ "@drizzle-team/brocli": "^0.12.0",
88
+ "@hono/node-server": "catalog:",
89
+ "@hono/trpc-server": "catalog:",
90
+ "@hono/zod-validator": "^0.8.0",
91
+ "@larksuiteoapi/node-sdk": "^1.65.0",
92
+ "@node-rs/jieba": "^2.0.1",
93
+ "@node-rs/xxhash": "^1.7.6",
94
+ "@openrouter/ai-sdk-provider": "^2.9.0",
95
+ "@trpc/server": "catalog:",
96
+ "@types/diff": "^8.0.0",
97
+ "a2a-ai-provider": "0.4.0-alpha.2",
98
+ "ai": "catalog:",
99
+ "ai-sdk-ollama": "^3.8.4",
100
+ "ansis": "catalog:",
101
+ "archiver": "^8.0.0",
102
+ "atomically": "^2.1.1",
103
+ "await-to-js": "catalog:",
104
+ "bash-tool": "^1.3.16",
105
+ "better-auth": "^1.6.11",
106
+ "better-sqlite3": "^12.10.0",
107
+ "bufferutil": "^4.1.0",
108
+ "croner": "^10.0.1",
109
+ "dayjs": "catalog:",
110
+ "diff": "^9.0.0",
111
+ "drizzle-kit": "1.0.0-rc.4-5d5b77c",
112
+ "drizzle-orm": "1.0.0-rc.4-5d5b77c",
113
+ "drizzle-zod": "^0.8.3",
114
+ "es-toolkit": "catalog:",
115
+ "evlog": "^2.18.1",
116
+ "fastq": "^1.20.1",
117
+ "fs-extra": "catalog:",
118
+ "globby": "catalog:",
119
+ "hono": "catalog:",
120
+ "jina-ai-provider": "^1.0.0",
121
+ "just-bash": "2.14.0",
122
+ "jws": "^4.0.1",
123
+ "lmdb": "^3.5.4",
124
+ "mammoth": "^1.12.0",
125
+ "minimatch": "^10.2.5",
126
+ "nice-try": "^4.0.2",
127
+ "node-llama-cpp": "^3.18.1",
128
+ "ofetch": "catalog:",
129
+ "pdf2pic": "^3.2.0",
130
+ "remark": "^15.0.1",
131
+ "remark-gfm": "^4.0.1",
132
+ "remark-math": "^6.0.0",
133
+ "ripgrep": "^0.3.1",
134
+ "safer-buffer": "^2.1.2",
135
+ "sentence-splitter": "^5.0.1",
136
+ "shelljs": "^0.10.0",
137
+ "simsimd": "^6.5.5",
138
+ "sqlite-vec": "^0.1.9",
139
+ "stk": "workspace:*",
140
+ "stopword": "^3.1.5",
141
+ "superjson": "^2.2.6",
142
+ "tinypool": "^2.1.0",
143
+ "trpc-to-openapi": "^3.3.0",
144
+ "ts-pattern": "^5.9.0",
145
+ "tslib": "catalog:",
146
+ "tsyringe": "catalog:",
147
+ "turndown": "^7.2.4",
148
+ "unzipper": "^0.12.3",
149
+ "utf-8-validate": "^6.0.6",
150
+ "uuid": "catalog:",
151
+ "vercel-minimax-ai-provider": "^0.0.2",
152
+ "watchpack": "catalog:",
153
+ "ws": "^8.21.0",
154
+ "zod-openapi": "^5.4.6",
155
+ "zhipu-ai-provider": "^0.3.1",
156
+ "zod": "catalog:"
157
+ },
158
+ "devDependencies": {
159
+ "@rslib/core": "catalog:",
160
+ "@rstest/core": "catalog:",
161
+ "@types/archiver": "^7.0.0",
162
+ "@types/better-sqlite3": "^7.6.13",
163
+ "@types/fs-extra": "catalog:",
164
+ "@types/mdast": "^4.0.4",
165
+ "@types/nice-try": "^2.1.2",
166
+ "@types/node": "catalog:",
167
+ "@types/shelljs": "^0.10.0",
168
+ "@types/stopword": "^2.0.3",
169
+ "@types/turndown": "^5.0.6",
170
+ "@types/unzipper": "^0.10.11",
171
+ "@types/watchpack": "catalog:",
172
+ "@types/ws": "^8.18.1",
173
+ "bun": "catalog:",
174
+ "bun-types": "catalog:",
175
+ "concurrently": "^9.2.1",
176
+ "cross-env": "catalog:",
177
+ "deepmerge-ts": "catalog:",
178
+ "delay-cli": "catalog:",
179
+ "drizzle-seed": "^0.3.1",
180
+ "picocolors": "^1.1.1",
181
+ "reflect-metadata": "catalog:",
182
+ "type-fest": "catalog:"
183
+ }
167
184
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 MatrixAges
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.