@promptowl/contextnest-community 1.16.1 → 1.18.0

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 (30) hide show
  1. package/CONFIGURATION.md +415 -415
  2. package/LICENSE.md +142 -142
  3. package/README.md +168 -169
  4. package/dist/{chunk-D6HICFVW.js → chunk-34UXRZXD.js} +59 -14
  5. package/dist/chunk-F66VCBLA.js +136 -0
  6. package/dist/{chunk-L7UCMGWZ.js → chunk-FUUJG6XP.js} +641 -285
  7. package/dist/{chunk-QJVRZT6M.js → chunk-HGN45I5P.js} +59 -21
  8. package/dist/{chunk-JMJLNEXE.js → chunk-HYSTFMFG.js} +43 -2
  9. package/dist/chunk-OOBZG6BW.js +379 -0
  10. package/dist/{chunk-OTGZQZKK.js → chunk-QUZXRLUA.js} +11 -10
  11. package/dist/{chunk-CLKZZZS2.js → chunk-TQACHVVA.js} +35 -4
  12. package/dist/{chunk-SLTQACJW.js → chunk-YB3LKF7U.js} +3 -1
  13. package/dist/{client-OBS5HOTA.js → client-SW5I6ZBK.js} +2 -2
  14. package/dist/engine-34E3YNX7.js +14 -0
  15. package/dist/external-edit-service-6Q6SHEOF.js +33 -0
  16. package/dist/{grants-service-I535QVTW.js → grants-service-ME7HIVHU.js} +5 -5
  17. package/dist/index.js +700 -526
  18. package/dist/{keys-73STFJJB.js → keys-CTOGAG3W.js} +5 -1
  19. package/dist/{migrations.postgres-CYKO5CFV.js → migrations.postgres-5VI4RDTS.js} +41 -4
  20. package/dist/{review-service-V2GR6VM3.js → review-service-H2M5ACPQ.js} +11 -9
  21. package/dist/{stewardship-service-LTREGVSJ.js → stewardship-service-U4CKL7Y5.js} +8 -4
  22. package/dist/{version-service-V6K5SZ3P.js → version-service-JWEN5UUW.js} +6 -4
  23. package/dist/web3/assets/{hootie-C2ocYkn4.svg → hootie-_U3ECslt.svg} +8 -8
  24. package/dist/web3/assets/index-DONv5_Ni.css +1 -0
  25. package/dist/web3/assets/index-jSGrnboh.js +1065 -0
  26. package/dist/web3/index.html +14 -14
  27. package/package.json +165 -165
  28. package/dist/chunk-XRK6SQSC.js +0 -58
  29. package/dist/web3/assets/index-DnQARUL3.css +0 -1
  30. package/dist/web3/assets/index-_m7WyozM.js +0 -1051
@@ -1,14 +1,14 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>ContextNest</title>
7
- <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🪺</text></svg>" />
8
- <script type="module" crossorigin src="/assets/index-_m7WyozM.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DnQARUL3.css">
10
- </head>
11
- <body class="bg-background text-foreground antialiased">
12
- <div id="root"></div>
13
- </body>
14
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>ContextNest</title>
7
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🪺</text></svg>" />
8
+ <script type="module" crossorigin src="/assets/index-jSGrnboh.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DONv5_Ni.css">
10
+ </head>
11
+ <body class="bg-background text-foreground antialiased">
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
package/package.json CHANGED
@@ -1,165 +1,165 @@
1
- {
2
- "name": "@promptowl/contextnest-community",
3
- "version": "1.16.1",
4
- "description": "ContextNest Community Edition — self-hosted context governance server for AI workflows. Commercial software by Promptowl LLC.",
5
- "private": false,
6
- "type": "module",
7
- "license": "SEE LICENSE IN LICENSE.md",
8
- "author": {
9
- "name": "Promptowl LLC",
10
- "email": "hoot@promptowl.ai",
11
- "url": "https://promptowl.ai"
12
- },
13
- "homepage": "https://promptowl.ai/contextnest/",
14
- "bugs": {
15
- "email": "hoot@promptowl.ai",
16
- "url": "https://promptowl.ai/contact-us/"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/PromptOwl/contextnest-community.git"
21
- },
22
- "keywords": [
23
- "contextnest",
24
- "promptowl",
25
- "context-governance",
26
- "llm",
27
- "mcp",
28
- "ai-workflows",
29
- "commercial"
30
- ],
31
- "main": "dist/index.js",
32
- "bin": {
33
- "contextnest-community": "dist/index.js"
34
- },
35
- "files": [
36
- "dist",
37
- "LICENSE.md",
38
- "README.md",
39
- "CONFIGURATION.md"
40
- ],
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "engines": {
45
- "node": ">=20.0.0"
46
- },
47
- "scripts": {
48
- "dev": "concurrently -k -n server,ui -c blue,magenta \"npm run dev:server\" \"npm run dev:ui\"",
49
- "dev:server": "tsx watch src/index.ts",
50
- "dev:ui": "vite build --config ui/vite.config.ts --watch",
51
- "build": "tsup src/index.ts --format esm --dts --clean && npm run build:ui",
52
- "build:server": "tsup src/index.ts --format esm --dts --clean",
53
- "build:ui": "vite build --config ui/vite.config.ts",
54
- "start": "node dist/index.js",
55
- "typecheck": "tsc --noEmit && tsc --noEmit -p ui/tsconfig.json",
56
- "lint:mcp-schemas": "node scripts/check-mcp-schemas.mjs",
57
- "test": "vitest run",
58
- "test:watch": "vitest",
59
- "prepublishOnly": "npm run build",
60
- "version-packages": "changeset version && npm install --package-lock-only",
61
- "release": "npm run build && changeset publish"
62
- },
63
- "pnpm": {
64
- "onlyBuiltDependencies": [
65
- "better-sqlite3",
66
- "esbuild"
67
- ]
68
- },
69
- "dependencies": {
70
- "@hono/node-server": "^1.13.8",
71
- "@modelcontextprotocol/sdk": "^1.12.1",
72
- "@promptowl/contextnest-engine": "^2.1.0",
73
- "@tanstack/react-query": "^5.101.4",
74
- "bcryptjs": "^3.0.3",
75
- "better-sqlite3": "^11.8.2",
76
- "dotenv": "^16.6.1",
77
- "hono": "4.12.25",
78
- "jose": "^6.2.3",
79
- "jszip": "^3.10.1",
80
- "nodemailer": "9.0.3",
81
- "pg": "^8.13.1",
82
- "uuid": "^14.0.0",
83
- "zod": "^4.3.6"
84
- },
85
- "devDependencies": {
86
- "@changesets/changelog-github": "^0.7.0",
87
- "@changesets/cli": "^2.31.0",
88
- "@radix-ui/react-alert-dialog": "^1.1.11",
89
- "@radix-ui/react-avatar": "^1.1.0",
90
- "@radix-ui/react-checkbox": "^1.1.1",
91
- "@radix-ui/react-dialog": "^1.1.15",
92
- "@radix-ui/react-dropdown-menu": "^2.1.12",
93
- "@radix-ui/react-icons": "^1.3.0",
94
- "@radix-ui/react-label": "^2.1.0",
95
- "@radix-ui/react-popover": "^1.1.11",
96
- "@radix-ui/react-progress": "^1.1.0",
97
- "@radix-ui/react-scroll-area": "^1.2.3",
98
- "@radix-ui/react-select": "^2.1.1",
99
- "@radix-ui/react-separator": "^1.1.0",
100
- "@radix-ui/react-slot": "^1.2.3",
101
- "@radix-ui/react-switch": "^1.1.2",
102
- "@radix-ui/react-tabs": "^1.1.9",
103
- "@radix-ui/react-tooltip": "^1.1.8",
104
- "@tailwindcss/typography": "^0.5.19",
105
- "@tiptap/core": "^3.23.2",
106
- "@tiptap/extension-character-count": "^3.23.2",
107
- "@tiptap/extension-code-block-lowlight": "^3.23.2",
108
- "@tiptap/extension-color": "^3.23.2",
109
- "@tiptap/extension-details": "^3.23.2",
110
- "@tiptap/extension-drag-handle-react": "^3.23.2",
111
- "@tiptap/extension-highlight": "^3.23.2",
112
- "@tiptap/extension-image": "3.23.2",
113
- "@tiptap/extension-link": "^3.23.2",
114
- "@tiptap/extension-node-range": "^3.23.2",
115
- "@tiptap/extension-placeholder": "^3.23.2",
116
- "@tiptap/extension-table": "^3.23.2",
117
- "@tiptap/extension-task-item": "^3.23.2",
118
- "@tiptap/extension-task-list": "^3.23.2",
119
- "@tiptap/extension-text-style": "^3.23.2",
120
- "@tiptap/extension-typography": "^3.23.2",
121
- "@tiptap/pm": "^3.23.2",
122
- "@tiptap/react": "^3.23.2",
123
- "@tiptap/starter-kit": "^3.23.2",
124
- "@types/bcryptjs": "^3.0.0",
125
- "@types/better-sqlite3": "^7.6.13",
126
- "@types/d3-force": "^3.0.10",
127
- "@types/nodemailer": "8.0.1",
128
- "@types/pg": "^8.11.10",
129
- "@types/react": "^18.3.0",
130
- "@types/react-dom": "^18.3.0",
131
- "@types/uuid": "^10.0.0",
132
- "@vitejs/plugin-react": "^4.3.0",
133
- "@vitest/coverage-v8": "3.2.6",
134
- "autoprefixer": "^10.4.20",
135
- "class-variance-authority": "^0.7.0",
136
- "clsx": "^2.1.1",
137
- "cmdk": "^1.0.0",
138
- "concurrently": "^9.2.1",
139
- "d3-force": "^3.0.0",
140
- "lowlight": "^3.3.0",
141
- "lucide-react": "^0.577.0",
142
- "markdown-it-container": "^4.0.0",
143
- "postcss": "^8.4.47",
144
- "react": "^18.3.1",
145
- "react-dom": "^18.3.1",
146
- "react-markdown": "^9.1.0",
147
- "remark-gfm": "^4.0.1",
148
- "sonner": "^2.0.7",
149
- "tailwind-merge": "^3.5.0",
150
- "tailwindcss": "^3.4.14",
151
- "tailwindcss-animate": "^1.0.7",
152
- "tiptap-markdown": "^0.9.0",
153
- "tsup": "^8.4.0",
154
- "tsx": "^4.19.4",
155
- "typescript": "^5.7.3",
156
- "vite": "6.4.3",
157
- "vitest": "3.2.6"
158
- },
159
- "overrides": {
160
- "shell-quote": "1.8.4",
161
- "qs": "6.15.2",
162
- "@babel/core": "7.29.6",
163
- "brace-expansion": "5.0.6"
164
- }
165
- }
1
+ {
2
+ "name": "@promptowl/contextnest-community",
3
+ "version": "1.18.0",
4
+ "description": "ContextNest Community Edition — self-hosted context governance server for AI workflows. Commercial software by Promptowl LLC.",
5
+ "private": false,
6
+ "type": "module",
7
+ "license": "SEE LICENSE IN LICENSE.md",
8
+ "author": {
9
+ "name": "Promptowl LLC",
10
+ "email": "hoot@promptowl.ai",
11
+ "url": "https://promptowl.ai"
12
+ },
13
+ "homepage": "https://promptowl.ai/contextnest/",
14
+ "bugs": {
15
+ "email": "hoot@promptowl.ai",
16
+ "url": "https://promptowl.ai/contact-us/"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/PromptOwl/contextnest-community.git"
21
+ },
22
+ "keywords": [
23
+ "contextnest",
24
+ "promptowl",
25
+ "context-governance",
26
+ "llm",
27
+ "mcp",
28
+ "ai-workflows",
29
+ "commercial"
30
+ ],
31
+ "main": "dist/index.js",
32
+ "bin": {
33
+ "contextnest-community": "dist/index.js"
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "LICENSE.md",
38
+ "README.md",
39
+ "CONFIGURATION.md"
40
+ ],
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "engines": {
45
+ "node": ">=20.12.0"
46
+ },
47
+ "scripts": {
48
+ "dev": "concurrently -k -n server,ui -c blue,magenta \"npm run dev:server\" \"npm run dev:ui\"",
49
+ "dev:server": "tsx watch src/index.ts",
50
+ "dev:ui": "vite build --config ui/vite.config.ts --watch",
51
+ "build": "tsup src/index.ts --format esm --dts --clean && npm run build:ui",
52
+ "build:server": "tsup src/index.ts --format esm --dts --clean",
53
+ "build:ui": "vite build --config ui/vite.config.ts",
54
+ "start": "node dist/index.js",
55
+ "typecheck": "tsc --noEmit && tsc --noEmit -p ui/tsconfig.json",
56
+ "lint:mcp-schemas": "node scripts/check-mcp-schemas.mjs",
57
+ "test": "vitest run",
58
+ "test:watch": "vitest",
59
+ "prepublishOnly": "npm run build",
60
+ "version-packages": "changeset version && npm install --package-lock-only",
61
+ "release": "npm run build && changeset publish"
62
+ },
63
+ "pnpm": {
64
+ "onlyBuiltDependencies": [
65
+ "better-sqlite3",
66
+ "esbuild"
67
+ ]
68
+ },
69
+ "dependencies": {
70
+ "@hono/node-server": "^1.13.8",
71
+ "@modelcontextprotocol/sdk": "^1.12.1",
72
+ "@promptowl/contextnest-engine": "^2.3.0",
73
+ "@tanstack/react-query": "^5.101.4",
74
+ "bcryptjs": "^3.0.3",
75
+ "better-sqlite3": "^11.8.2",
76
+ "dotenv": "^16.6.1",
77
+ "hono": "4.12.25",
78
+ "jose": "^6.2.3",
79
+ "jszip": "^3.10.1",
80
+ "nodemailer": "9.0.3",
81
+ "pg": "^8.13.1",
82
+ "uuid": "^14.0.0",
83
+ "zod": "^4.3.6"
84
+ },
85
+ "devDependencies": {
86
+ "@changesets/changelog-github": "^0.7.0",
87
+ "@changesets/cli": "^2.31.0",
88
+ "@radix-ui/react-alert-dialog": "^1.1.11",
89
+ "@radix-ui/react-avatar": "^1.1.0",
90
+ "@radix-ui/react-checkbox": "^1.1.1",
91
+ "@radix-ui/react-dialog": "^1.1.15",
92
+ "@radix-ui/react-dropdown-menu": "^2.1.12",
93
+ "@radix-ui/react-icons": "^1.3.0",
94
+ "@radix-ui/react-label": "^2.1.0",
95
+ "@radix-ui/react-popover": "^1.1.11",
96
+ "@radix-ui/react-progress": "^1.1.0",
97
+ "@radix-ui/react-scroll-area": "^1.2.3",
98
+ "@radix-ui/react-select": "^2.1.1",
99
+ "@radix-ui/react-separator": "^1.1.0",
100
+ "@radix-ui/react-slot": "^1.2.3",
101
+ "@radix-ui/react-switch": "^1.1.2",
102
+ "@radix-ui/react-tabs": "^1.1.9",
103
+ "@radix-ui/react-tooltip": "^1.1.8",
104
+ "@tailwindcss/typography": "^0.5.19",
105
+ "@tiptap/core": "^3.23.2",
106
+ "@tiptap/extension-character-count": "^3.23.2",
107
+ "@tiptap/extension-code-block-lowlight": "^3.23.2",
108
+ "@tiptap/extension-color": "^3.23.2",
109
+ "@tiptap/extension-details": "^3.23.2",
110
+ "@tiptap/extension-drag-handle-react": "^3.23.2",
111
+ "@tiptap/extension-highlight": "^3.23.2",
112
+ "@tiptap/extension-image": "3.23.2",
113
+ "@tiptap/extension-link": "^3.23.2",
114
+ "@tiptap/extension-node-range": "^3.23.2",
115
+ "@tiptap/extension-placeholder": "^3.23.2",
116
+ "@tiptap/extension-table": "^3.23.2",
117
+ "@tiptap/extension-task-item": "^3.23.2",
118
+ "@tiptap/extension-task-list": "^3.23.2",
119
+ "@tiptap/extension-text-style": "^3.23.2",
120
+ "@tiptap/extension-typography": "^3.23.2",
121
+ "@tiptap/pm": "^3.23.2",
122
+ "@tiptap/react": "^3.23.2",
123
+ "@tiptap/starter-kit": "^3.23.2",
124
+ "@types/bcryptjs": "^3.0.0",
125
+ "@types/better-sqlite3": "^7.6.13",
126
+ "@types/d3-force": "^3.0.10",
127
+ "@types/nodemailer": "8.0.1",
128
+ "@types/pg": "^8.11.10",
129
+ "@types/react": "^18.3.0",
130
+ "@types/react-dom": "^18.3.0",
131
+ "@types/uuid": "^10.0.0",
132
+ "@vitejs/plugin-react": "^4.3.0",
133
+ "@vitest/coverage-v8": "3.2.6",
134
+ "autoprefixer": "^10.4.20",
135
+ "class-variance-authority": "^0.7.0",
136
+ "clsx": "^2.1.1",
137
+ "cmdk": "^1.0.0",
138
+ "concurrently": "^9.2.1",
139
+ "d3-force": "^3.0.0",
140
+ "lowlight": "^3.3.0",
141
+ "lucide-react": "^0.577.0",
142
+ "markdown-it-container": "^4.0.0",
143
+ "postcss": "^8.4.47",
144
+ "react": "^18.3.1",
145
+ "react-dom": "^18.3.1",
146
+ "react-markdown": "^9.1.0",
147
+ "remark-gfm": "^4.0.1",
148
+ "sonner": "^2.0.7",
149
+ "tailwind-merge": "^3.5.0",
150
+ "tailwindcss": "^3.4.14",
151
+ "tailwindcss-animate": "^1.0.7",
152
+ "tiptap-markdown": "^0.9.0",
153
+ "tsup": "^8.4.0",
154
+ "tsx": "^4.19.4",
155
+ "typescript": "^5.7.3",
156
+ "vite": "6.4.3",
157
+ "vitest": "3.2.6"
158
+ },
159
+ "overrides": {
160
+ "shell-quote": "1.8.4",
161
+ "qs": "6.15.2",
162
+ "@babel/core": "7.29.6",
163
+ "brace-expansion": "5.0.6"
164
+ }
165
+ }
@@ -1,58 +0,0 @@
1
- // src/auth/keys.ts
2
- import { randomBytes, createHash, timingSafeEqual } from "crypto";
3
- import bcrypt from "bcryptjs";
4
- var KEY_PREFIX = "cnst_";
5
- var BCRYPT_ROUNDS = process.env.VITEST ? 4 : 12;
6
- function generateApiKey() {
7
- return KEY_PREFIX + randomBytes(32).toString("hex");
8
- }
9
- function hashApiKey(key) {
10
- return createHash("sha256").update(key).digest("hex");
11
- }
12
- function getKeyPrefix(key) {
13
- return key.slice(0, 12) + "...";
14
- }
15
- function parseBearerToken(header) {
16
- if (!header) return null;
17
- const BEARER = "Bearer ";
18
- if (!header.startsWith(BEARER)) return null;
19
- const token = header.slice(BEARER.length);
20
- if (!token.startsWith(KEY_PREFIX)) return null;
21
- if (token.length < KEY_PREFIX.length + 32) return null;
22
- return token;
23
- }
24
- async function hashPassword(password) {
25
- return bcrypt.hash(password, BCRYPT_ROUNDS);
26
- }
27
- async function verifyPassword(password, stored) {
28
- if (isBcrypt(stored)) {
29
- return { ok: await bcrypt.compare(password, stored), needsRehash: false };
30
- }
31
- const [salt, hash] = stored.split(":");
32
- if (!salt || !hash) return { ok: false, needsRehash: false };
33
- const attempt = createHash("sha256").update(salt + password).digest("hex");
34
- return {
35
- ok: timingSafeEqualHex(hash, attempt),
36
- needsRehash: true
37
- };
38
- }
39
- function isBcrypt(stored) {
40
- return stored.startsWith("$2a$") || stored.startsWith("$2b$") || stored.startsWith("$2y$");
41
- }
42
- function timingSafeEqualHex(a, b) {
43
- if (a.length !== b.length) return false;
44
- try {
45
- return timingSafeEqual(Buffer.from(a, "hex"), Buffer.from(b, "hex"));
46
- } catch {
47
- return false;
48
- }
49
- }
50
-
51
- export {
52
- generateApiKey,
53
- hashApiKey,
54
- getKeyPrefix,
55
- parseBearerToken,
56
- hashPassword,
57
- verifyPassword
58
- };