polywise 0.0.1 → 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,161 +1,184 @@
1
1
  {
2
- "name": "polywise",
3
- "version": "0.0.1",
4
- "type": "module",
5
- "main": "./dist/index.js",
6
- "sideEffects": false,
7
- "exports": {
8
- ".": {
9
- "types": "./dist/src/index.d.ts",
10
- "import": "./dist/index.js",
11
- "default": "./dist/index.js"
12
- }
13
- },
14
- "bin": {
15
- "polywise": "./dist/cli.js"
16
- },
17
- "files": [
18
- "dist",
19
- "./package.json",
20
- "./README.md"
21
- ],
22
- "scripts": {
23
- "build:standalone": "npm run rebuild && cross-env NODE_ENV=production rslib build && bun ./scripts/copyAppDist.ts",
24
- "build:electron": "cross-env NODE_ENV=production rslib build",
25
- "build:watch": "cross-env NODE_ENV=development rslib build --watch",
26
- "cli": "node ./dist/cli.js",
27
- "copy:app-dist": "bun ./scripts/copyAppDist.ts",
28
- "start": "node ./dist/index.js",
29
- "start:watch": "delay 600ms && cross-env NODE_ENV=development node --watch ./dist/index.js",
30
- "dev": "concurrently -c \"cyan,magenta\" \"npm run build:watch\" \"npm run start:watch\"",
31
- "test": "rstest run $TEST_FILE",
32
- "sql": "drizzle-kit generate",
33
- "auth:sql": "pnpx auth generate --adapter drizzle",
34
- "auth:migrate": "pnpx auth migrate",
35
- "studio": "drizzle-kit studio",
36
- "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",
37
- "pub": "npm publish --access public --no-git-checks"
38
- },
39
- "dependencies": {
40
- "@abraham/reflection": "catalog:",
41
- "@ai-sdk/amazon-bedrock": "^4.0.108",
42
- "@ai-sdk/anthropic": "^3.0.79",
43
- "@ai-sdk/azure": "^3.0.66",
44
- "@ai-sdk/cerebras": "^2.0.54",
45
- "@ai-sdk/cohere": "^3.0.36",
46
- "@ai-sdk/deepinfra": "^2.0.52",
47
- "@ai-sdk/deepseek": "^2.0.35",
48
- "@ai-sdk/fireworks": "^2.0.53",
49
- "@ai-sdk/google": "^3.0.79",
50
- "@ai-sdk/groq": "^3.0.39",
51
- "@ai-sdk/mcp": "^1.0.43",
52
- "@ai-sdk/mistral": "^3.0.37",
53
- "@ai-sdk/moonshotai": "^2.0.23",
54
- "@ai-sdk/open-responses": "^1.0.16",
55
- "@ai-sdk/openai": "catalog:",
56
- "@ai-sdk/openai-compatible": "^2.0.48",
57
- "@ai-sdk/perplexity": "^3.0.33",
58
- "@ai-sdk/provider-utils": "catalog:",
59
- "@ai-sdk/togetherai": "^2.0.53",
60
- "@ai-sdk/vercel": "^2.0.50",
61
- "@ai-sdk/xai": "^3.0.92",
62
- "@better-auth/drizzle-adapter": "^1.6.11",
63
- "@chonkiejs/core": "^0.0.10",
64
- "@drizzle-team/brocli": "^0.12.0",
65
- "@hono/node-server": "catalog:",
66
- "@hono/trpc-server": "catalog:",
67
- "@hono/zod-validator": "^0.8.0",
68
- "@larksuiteoapi/node-sdk": "^1.65.0",
69
- "@node-rs/jieba": "^2.0.1",
70
- "@node-rs/xxhash": "^1.7.6",
71
- "@openrouter/ai-sdk-provider": "^2.9.0",
72
- "@trpc/server": "catalog:",
73
- "@types/diff": "^8.0.0",
74
- "a2a-ai-provider": "0.4.0-alpha.2",
75
- "ai": "catalog:",
76
- "ai-sdk-ollama": "^3.8.4",
77
- "ansis": "catalog:",
78
- "archiver": "^8.0.0",
79
- "atomically": "^2.1.1",
80
- "await-to-js": "catalog:",
81
- "bash-tool": "^1.3.16",
82
- "better-auth": "^1.6.11",
83
- "better-sqlite3": "^12.10.0",
84
- "bufferutil": "^4.1.0",
85
- "croner": "^10.0.1",
86
- "dayjs": "catalog:",
87
- "diff": "^9.0.0",
88
- "drizzle-kit": "1.0.0-rc.4-5d5b77c",
89
- "drizzle-orm": "1.0.0-rc.4-5d5b77c",
90
- "drizzle-zod": "^0.8.3",
91
- "es-toolkit": "catalog:",
92
- "evlog": "^2.18.1",
93
- "fastq": "^1.20.1",
94
- "fs-extra": "catalog:",
95
- "globby": "catalog:",
96
- "hono": "catalog:",
97
- "jina-ai-provider": "^1.0.0",
98
- "just-bash": "2.14.0",
99
- "jws": "^4.0.1",
100
- "lmdb": "^3.5.4",
101
- "mammoth": "^1.12.0",
102
- "minimatch": "^10.2.5",
103
- "nice-try": "^4.0.2",
104
- "node-llama-cpp": "^3.18.1",
105
- "ofetch": "catalog:",
106
- "pdf2pic": "^3.2.0",
107
- "remark": "^15.0.1",
108
- "remark-gfm": "^4.0.1",
109
- "remark-math": "^6.0.0",
110
- "ripgrep": "^0.3.1",
111
- "safer-buffer": "^2.1.2",
112
- "sentence-splitter": "^5.0.1",
113
- "shelljs": "^0.10.0",
114
- "simsimd": "^6.5.5",
115
- "sqlite-vec": "^0.1.9",
116
- "stk": "workspace:*",
117
- "stopword": "^3.1.5",
118
- "superjson": "^2.2.6",
119
- "tinypool": "^2.1.0",
120
- "trpc-to-openapi": "^3.3.0",
121
- "ts-pattern": "^5.9.0",
122
- "tslib": "catalog:",
123
- "tsyringe": "catalog:",
124
- "turndown": "^7.2.4",
125
- "unzipper": "^0.12.3",
126
- "utf-8-validate": "^6.0.6",
127
- "uuid": "catalog:",
128
- "vercel-minimax-ai-provider": "^0.0.2",
129
- "watchpack": "catalog:",
130
- "ws": "^8.21.0",
131
- "zod-openapi": "^5.4.6",
132
- "zhipu-ai-provider": "^0.3.1",
133
- "zod": "catalog:"
134
- },
135
- "devDependencies": {
136
- "@rslib/core": "catalog:",
137
- "@rstest/core": "catalog:",
138
- "@types/archiver": "^7.0.0",
139
- "@types/better-sqlite3": "^7.6.13",
140
- "@types/fs-extra": "catalog:",
141
- "@types/mdast": "^4.0.4",
142
- "@types/nice-try": "^2.1.2",
143
- "@types/node": "catalog:",
144
- "@types/shelljs": "^0.10.0",
145
- "@types/stopword": "^2.0.3",
146
- "@types/turndown": "^5.0.6",
147
- "@types/unzipper": "^0.10.11",
148
- "@types/watchpack": "catalog:",
149
- "@types/ws": "^8.18.1",
150
- "bun": "catalog:",
151
- "bun-types": "catalog:",
152
- "concurrently": "^9.2.1",
153
- "cross-env": "catalog:",
154
- "deepmerge-ts": "catalog:",
155
- "delay-cli": "catalog:",
156
- "drizzle-seed": "^0.3.1",
157
- "picocolors": "^1.1.1",
158
- "reflect-metadata": "catalog:",
159
- "type-fest": "catalog:"
160
- }
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
+ }
161
184
  }