@promptowl/contextnest-community 1.5.0 → 1.7.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.
- package/CONFIGURATION.md +181 -123
- package/LICENSE.md +142 -142
- package/README.md +224 -211
- package/dist/adapter.postgres-YOODX2BI.js +71 -0
- package/dist/{chunk-EMOE53KX.js → chunk-43DOX4LH.js} +356 -267
- package/dist/{chunk-IWA2UDAT.js → chunk-MOXICJPD.js} +116 -90
- package/dist/{chunk-RMU3LOPH.js → chunk-QMLAXQES.js} +383 -69
- package/dist/chunk-SLTQACJW.js +8 -0
- package/dist/{chunk-HIH7I232.js → chunk-VD5QX2ZQ.js} +69 -53
- package/dist/index.js +1427 -976
- package/dist/migrations.postgres-3HMGLKOV.js +279 -0
- package/dist/{review-service-XNXHF6Q7.js → review-service-2FSKW425.js} +5 -4
- package/dist/{stewardship-service-P4M5UEJW.js → stewardship-service-I2JAFYJU.js} +3 -2
- package/dist/{version-service-REGL5CUT.js → version-service-FJWVTZKR.js} +3 -2
- package/dist/web3/assets/{hootie-C2ocYkn4.svg → hootie-_U3ECslt.svg} +8 -8
- package/dist/web3/assets/index-24dBhQSQ.css +1 -0
- package/dist/web3/assets/index-DpM8J4RN.js +889 -0
- package/dist/web3/index.html +14 -14
- package/package.json +152 -150
- package/dist/web3/assets/index-C2dfT3Et.css +0 -1
- package/dist/web3/assets/index-DEKnE-ty.js +0 -887
package/README.md
CHANGED
|
@@ -1,211 +1,224 @@
|
|
|
1
|
-
# ContextNest Community Edition
|
|
2
|
-
|
|
3
|
-
**Self-hosted context governance server for AI workflows.** Part of the [PromptOwl](https://promptowl.ai) platform.
|
|
4
|
-
|
|
5
|
-
> ⚠️ **Commercial Software.** ContextNest Community Edition is proprietary software licensed by Promptowl LLC. A free [PromptOwl account](https://app.promptowl.ai) is required to use it. Redistribution, hosting-as-a-service, and competitive use are prohibited. See [LICENSE.md](./LICENSE.md) for full terms.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## What it is
|
|
10
|
-
|
|
11
|
-
ContextNest Community Edition is a self-hosted server that lets you:
|
|
12
|
-
|
|
13
|
-
- Store, version, and govern markdown-based context documents ("nests")
|
|
14
|
-
- Import an existing folder or vault of markdown files in one step
|
|
15
|
-
- Apply stewardship workflows — draft, pending review, approved
|
|
16
|
-
- Share nests with collaborators or publish them read-only to the public
|
|
17
|
-
- Serve approved context to AI agents via MCP, HTTP, or CLI
|
|
18
|
-
- Sync with the PromptOwl hosted platform for multi-user collaboration
|
|
19
|
-
|
|
20
|
-
The server runs locally or on your own infrastructure. Your PromptOwl account handles authentication, entitlement, and governance metadata.
|
|
21
|
-
|
|
22
|
-
## Quickstart
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
# 1. Run the community server
|
|
26
|
-
npx @promptowl/contextnest-community
|
|
27
|
-
|
|
28
|
-
# 2. Open the server in your browser
|
|
29
|
-
# http://localhost:3838
|
|
30
|
-
# On first boot with no license, it lands on the License Setup Page.
|
|
31
|
-
|
|
32
|
-
# 3. Paste your PromptOwl license key (pk_...) — see "License setup" below
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The server listens on `http://localhost:3838` by default. Without a valid license the server still runs and serves reads, but write actions return `503` until you activate. See [CONFIGURATION.md](./CONFIGURATION.md) for all environment variables (port, auth mode, storage, telemetry).
|
|
36
|
-
|
|
37
|
-
> **Optional:** scaffold a local nest with the open-source CLI before connecting:
|
|
38
|
-
> ```bash
|
|
39
|
-
> npx @promptowl/contextnest-cli init
|
|
40
|
-
> ```
|
|
41
|
-
|
|
42
|
-
## License setup
|
|
43
|
-
|
|
44
|
-
ContextNest Community Edition requires a PromptOwl Community License key (`pk_...`). Getting and activating one:
|
|
45
|
-
|
|
46
|
-
### 1. Create the key (free)
|
|
47
|
-
|
|
48
|
-
1. Sign up or log in at <https://app.promptowl.ai>
|
|
49
|
-
2. Open the **Overview** menu → **Community License**
|
|
50
|
-
3. Click **Create a Community License key**
|
|
51
|
-
4. Copy the generated key — it starts with `pk_`
|
|
52
|
-
|
|
53
|
-
### 2. Activate the server
|
|
54
|
-
|
|
55
|
-
Pick **one** of two ways:
|
|
56
|
-
|
|
57
|
-
**A. Browser setup page (recommended for first run)**
|
|
58
|
-
|
|
59
|
-
1. Start the server: `npx @promptowl/contextnest-community`
|
|
60
|
-
2. Open <http://localhost:3838> — with no license installed, the server boots into **setup mode** and shows the **License Setup Page**
|
|
61
|
-
3. Paste your `pk_...` key and submit
|
|
62
|
-
4. The server validates it against PromptOwl, writes it to your `.env`, and exits setup mode — no restart needed
|
|
63
|
-
|
|
64
|
-
**B. Environment variable (recommended for Docker / CI / scripted deploys)**
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
PROMPTOWL_KEY=pk_... npx @promptowl/contextnest-community
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
The key is read at boot. The server validates against PromptOwl on startup; if valid, it goes straight into licensed mode.
|
|
71
|
-
|
|
72
|
-
### 3. How licensing behaves at runtime
|
|
73
|
-
|
|
74
|
-
- **Unlicensed / setup mode** — reads work; every non-GET (write) request returns `503` until a valid key is installed.
|
|
75
|
-
- **Live revocation** — a long-poll watcher tracks license state against PromptOwl. If your key is revoked, the server blocks writes within seconds (no restart required) and returns to setup mode.
|
|
76
|
-
- **Admin identity follows the license** — the admin user is whichever PromptOwl account owns the installed key, resolved live per request. Transferring the license to another account immediately promotes the new owner and demotes the old one.
|
|
77
|
-
|
|
78
|
-
For redistribution, hosted-service, OEM, or regulated-industry licensing, contact **hoot@promptowl.ai**.
|
|
79
|
-
|
|
80
|
-
## System requirements
|
|
81
|
-
|
|
82
|
-
- **Node.js** 20.x or later
|
|
83
|
-
- **PromptOwl account** — free signup at <https://app.promptowl.ai/signup>
|
|
84
|
-
- **OS:** Windows, macOS, or Linux
|
|
85
|
-
- **Disk:** ~200 MB for the server, plus storage for your nests
|
|
86
|
-
|
|
87
|
-
## What you get
|
|
88
|
-
|
|
89
|
-
| Feature | Community Edition | Enterprise |
|
|
90
|
-
|---|:---:|:---:|
|
|
91
|
-
| Self-hosted context server | ✅ | ✅ |
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
| Markdown
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- **
|
|
118
|
-
- **
|
|
119
|
-
- **
|
|
120
|
-
- **
|
|
121
|
-
- **
|
|
122
|
-
- **
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- **
|
|
132
|
-
-
|
|
133
|
-
- **
|
|
134
|
-
- **
|
|
135
|
-
- **
|
|
136
|
-
- **
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
|
|
140
|
-
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
141
|
-
|
|
142
|
-
## What's new in 1.
|
|
143
|
-
|
|
144
|
-
- **
|
|
145
|
-
-
|
|
146
|
-
- **
|
|
147
|
-
- **
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
150
|
-
- **
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- **
|
|
158
|
-
- **
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
1
|
+
# ContextNest Community Edition
|
|
2
|
+
|
|
3
|
+
**Self-hosted context governance server for AI workflows.** Part of the [PromptOwl](https://promptowl.ai) platform.
|
|
4
|
+
|
|
5
|
+
> ⚠️ **Commercial Software.** ContextNest Community Edition is proprietary software licensed by Promptowl LLC. A free [PromptOwl account](https://app.promptowl.ai) is required to use it. Redistribution, hosting-as-a-service, and competitive use are prohibited. See [LICENSE.md](./LICENSE.md) for full terms.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What it is
|
|
10
|
+
|
|
11
|
+
ContextNest Community Edition is a self-hosted server that lets you:
|
|
12
|
+
|
|
13
|
+
- Store, version, and govern markdown-based context documents ("nests")
|
|
14
|
+
- Import an existing folder or vault of markdown files in one step
|
|
15
|
+
- Apply stewardship workflows — draft, pending review, approved
|
|
16
|
+
- Share nests with collaborators or publish them read-only to the public
|
|
17
|
+
- Serve approved context to AI agents via MCP, HTTP, or CLI
|
|
18
|
+
- Sync with the PromptOwl hosted platform for multi-user collaboration
|
|
19
|
+
|
|
20
|
+
The server runs locally or on your own infrastructure. Your PromptOwl account handles authentication, entitlement, and governance metadata.
|
|
21
|
+
|
|
22
|
+
## Quickstart
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 1. Run the community server
|
|
26
|
+
npx @promptowl/contextnest-community
|
|
27
|
+
|
|
28
|
+
# 2. Open the server in your browser
|
|
29
|
+
# http://localhost:3838
|
|
30
|
+
# On first boot with no license, it lands on the License Setup Page.
|
|
31
|
+
|
|
32
|
+
# 3. Paste your PromptOwl license key (pk_...) — see "License setup" below
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The server listens on `http://localhost:3838` by default. Without a valid license the server still runs and serves reads, but write actions return `503` until you activate. See [CONFIGURATION.md](./CONFIGURATION.md) for all environment variables (port, auth mode, storage, telemetry).
|
|
36
|
+
|
|
37
|
+
> **Optional:** scaffold a local nest with the open-source CLI before connecting:
|
|
38
|
+
> ```bash
|
|
39
|
+
> npx @promptowl/contextnest-cli init
|
|
40
|
+
> ```
|
|
41
|
+
|
|
42
|
+
## License setup
|
|
43
|
+
|
|
44
|
+
ContextNest Community Edition requires a PromptOwl Community License key (`pk_...`). Getting and activating one:
|
|
45
|
+
|
|
46
|
+
### 1. Create the key (free)
|
|
47
|
+
|
|
48
|
+
1. Sign up or log in at <https://app.promptowl.ai>
|
|
49
|
+
2. Open the **Overview** menu → **Community License**
|
|
50
|
+
3. Click **Create a Community License key**
|
|
51
|
+
4. Copy the generated key — it starts with `pk_`
|
|
52
|
+
|
|
53
|
+
### 2. Activate the server
|
|
54
|
+
|
|
55
|
+
Pick **one** of two ways:
|
|
56
|
+
|
|
57
|
+
**A. Browser setup page (recommended for first run)**
|
|
58
|
+
|
|
59
|
+
1. Start the server: `npx @promptowl/contextnest-community`
|
|
60
|
+
2. Open <http://localhost:3838> — with no license installed, the server boots into **setup mode** and shows the **License Setup Page**
|
|
61
|
+
3. Paste your `pk_...` key and submit
|
|
62
|
+
4. The server validates it against PromptOwl, writes it to your `.env`, and exits setup mode — no restart needed
|
|
63
|
+
|
|
64
|
+
**B. Environment variable (recommended for Docker / CI / scripted deploys)**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
PROMPTOWL_KEY=pk_... npx @promptowl/contextnest-community
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The key is read at boot. The server validates against PromptOwl on startup; if valid, it goes straight into licensed mode.
|
|
71
|
+
|
|
72
|
+
### 3. How licensing behaves at runtime
|
|
73
|
+
|
|
74
|
+
- **Unlicensed / setup mode** — reads work; every non-GET (write) request returns `503` until a valid key is installed.
|
|
75
|
+
- **Live revocation** — a long-poll watcher tracks license state against PromptOwl. If your key is revoked, the server blocks writes within seconds (no restart required) and returns to setup mode.
|
|
76
|
+
- **Admin identity follows the license** — the admin user is whichever PromptOwl account owns the installed key, resolved live per request. Transferring the license to another account immediately promotes the new owner and demotes the old one.
|
|
77
|
+
|
|
78
|
+
For redistribution, hosted-service, OEM, or regulated-industry licensing, contact **hoot@promptowl.ai**.
|
|
79
|
+
|
|
80
|
+
## System requirements
|
|
81
|
+
|
|
82
|
+
- **Node.js** 20.x or later
|
|
83
|
+
- **PromptOwl account** — free signup at <https://app.promptowl.ai/signup>
|
|
84
|
+
- **OS:** Windows, macOS, or Linux
|
|
85
|
+
- **Disk:** ~200 MB for the server, plus storage for your nests
|
|
86
|
+
|
|
87
|
+
## What you get
|
|
88
|
+
|
|
89
|
+
| Feature | Community Edition | Enterprise |
|
|
90
|
+
|---|:---:|:---:|
|
|
91
|
+
| Self-hosted context server | ✅ | ✅ |
|
|
92
|
+
| SQLite or PostgreSQL / Cloud SQL backend | ✅ | ✅ |
|
|
93
|
+
| Configurable nest storage (external / GCS volume mount) | ✅ | ✅ |
|
|
94
|
+
| Markdown + YAML frontmatter vaults | ✅ | ✅ |
|
|
95
|
+
| Import existing folder / vault | ✅ | ✅ |
|
|
96
|
+
| Markdown rendering + wiki cross-linking | ✅ | ✅ |
|
|
97
|
+
| External-edit detection + version diff | ✅ | ✅ |
|
|
98
|
+
| Stewardship workflow (draft/review/approve) | ✅ | ✅ |
|
|
99
|
+
| Per-nest sharing + collaborators | ✅ | ✅ |
|
|
100
|
+
| Public read-only nests | ✅ | ✅ |
|
|
101
|
+
| Custom logo / branding | ✅ | ✅ |
|
|
102
|
+
| Admin password reset + user removal (in-platform) | ✅ | ✅ |
|
|
103
|
+
| Wiki backlinks, outline, hover-preview, link health | ✅ | ✅ |
|
|
104
|
+
| Rich editor — tables, callouts, toggles, code highlight, find/replace | ✅ | ✅ |
|
|
105
|
+
| Steward version revert | ✅ | ✅ |
|
|
106
|
+
| MCP server for AI agents | ✅ | ✅ |
|
|
107
|
+
| Centralized multi-tenant admin console | — | ✅ |
|
|
108
|
+
| SSO / SAML / SCIM | — | ✅ |
|
|
109
|
+
| Audit log streaming | — | ✅ |
|
|
110
|
+
| Policy transforms (redaction, summarization) | — | ✅ |
|
|
111
|
+
| Priority support and SLA | — | ✅ |
|
|
112
|
+
|
|
113
|
+
For Enterprise pricing and features, contact **hoot@promptowl.ai** or visit <https://promptowl.ai/contextnest/>.
|
|
114
|
+
|
|
115
|
+
## What's new in 1.6.0
|
|
116
|
+
|
|
117
|
+
- **PostgreSQL / Cloud SQL backend** — run the server on PostgreSQL alongside SQLite via an async DB adapter, so metadata survives on Cloud Run and other deployments where local disk isn't durable. Supports the Cloud SQL Auth Proxy (unix socket) and TCP + TLS. New `DB_*` env vars (`DB_DRIVER`, `DATABASE_URL`, `CLOUD_SQL_CONNECTION_NAME`, `DB_HOST`/`DB_PORT`/`DB_USER`/`DB_PASSWORD`/`DB_NAME`, `DB_POOL_MAX`, `DB_SSL`, `DB_SSL_CA`); SQLite stays the default when nothing is configured. See [CONFIGURATION.md](./CONFIGURATION.md).
|
|
118
|
+
- **Configurable `NEST_STORAGE_ROOT`** — store nest vault files (markdown + version history) outside `DATA_ROOT` — e.g. on a Cloud Storage (GCS) volume mount — while the database stays on `DATA_ROOT`. Defaults to `<DATA_ROOT>/nests`, so existing deployments are unchanged. On a GCS FUSE mount, set `DRIFT_SCAN_INTERVAL_MS=0` and run a single instance.
|
|
119
|
+
- **Security fix** — the admin guard on `/admin/settings` (GET/PATCH) is now correctly awaited; without it a non-admin could read or change server-wide settings in key mode.
|
|
120
|
+
- **AdminLoginModal respects `PROMPTOWL_SIGN_IN_GATE`** — the "Sign in with PromptOwl" affordance follows the configured gate (`open` / `admin-only` / `disabled`).
|
|
121
|
+
- **Drift scanner toggle** — `DRIFT_SCAN_INTERVAL_MS=0` now actually disables the drift scanner (previously reset to the 30s default).
|
|
122
|
+
- **Safer folder sync** — unsynced-folder detection no longer treats a configured nest storage root as a sync candidate, preventing accidental duplication/removal of live nests when `NEST_STORAGE_ROOT` is nested under `DATA_ROOT`.
|
|
123
|
+
|
|
124
|
+
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
125
|
+
|
|
126
|
+
## What's new in 1.3.0
|
|
127
|
+
|
|
128
|
+
- **Server super-admins** — emails listed in `access.yaml: super_admins` administer every nest (change visibility, manage collaborators and stewards) without being added per-nest. Owner-only operations (delete, transfer) still require the nest owner. See [STEWARDSHIP.md](./STEWARDSHIP.md).
|
|
129
|
+
- **License persistence under `DATA_ROOT`** — `PROMPTOWL_KEY` now writes to `$DATA_ROOT/.env` (was `$cwd/.env`, which is root-owned `/app` in the official Docker image and silently lost the key on container recreate). The License Setup Page also surfaces write failures instead of failing quietly. Override via `ENV_FILE_PATH`. See [CONFIGURATION.md](./CONFIGURATION.md).
|
|
130
|
+
- **Case-insensitive email** across registration, login, invite, and access checks. Migration dedupes existing accounts that differ only in case; fixes "I can't log in because I capitalized my email" and access-guard / lockout mismatches.
|
|
131
|
+
- **Document version history + inline diff** — every saved version is browsable in the document detail view, and an inline diff highlights what changed between any two versions.
|
|
132
|
+
- **Nest Overview / index landing** — every nest opens on a grouped table-of-contents with a "recently edited" strip instead of a flat list.
|
|
133
|
+
- **Public/private toggle on the nest header** — visibility is set directly from the header, not buried in a dialog.
|
|
134
|
+
- **Review queue surfaces submitted-for-review edits** — reviewers see the pending versions a contributor staged, not just net-new documents.
|
|
135
|
+
- **Internal-folder sync over MCP** — agents can list a nest's unsynced filesystem folders and pull them into the nest on demand. New `unsynced-service.ts` + MCP tools, covered by `test/unsynced-folder.test.ts` and `test/mcp-unsynced.test.ts`.
|
|
136
|
+
- **Telemetry `batch_id` + user email** — usage events carry a stable `batch_id` (de-duped on the receiver) and the authenticated user email alongside the user id, so the PromptOwl ingest bridge can meter credits to the right account.
|
|
137
|
+
- **Hyperlink navigation fix** — hyperlinks in the editor and viewer navigate to their configured target URL correctly.
|
|
138
|
+
- **Repo / DX** — `CLAUDE.md` at the repo root with project-specific guidance for Claude Code; `claude.yml` (PR assistant) and `claude-code-review.yml` (auto review on PRs) GitHub Actions workflows.
|
|
139
|
+
|
|
140
|
+
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
141
|
+
|
|
142
|
+
## What's new in 1.2.0
|
|
143
|
+
|
|
144
|
+
- **Admin user management (no email server needed)** — `POST /auth/admin/reset-password/:userId` sets a user's password or returns a one-time temp password; `DELETE /auth/users/:userId` removes a user and revokes their API keys, sessions, and role rows. New self-service **Change password** in the user menu blocks reusing the current password.
|
|
145
|
+
- **`PROMPTOWL_SIGN_IN_GATE`** — `open` / `admin-only` / `disabled` restricts "Sign in with PromptOwl" (admin reaches it via `?admin=1`). See [CONFIGURATION.md](./CONFIGURATION.md).
|
|
146
|
+
- **Plain-text agent view** — `?format=markdown` on a node returns frontmatter + body as `text/markdown` for LLM-friendly consumption.
|
|
147
|
+
- **Steward version revert** — `POST .../revert` restores an earlier version as a new one; pending-review docs are now editable (saving withdraws the review).
|
|
148
|
+
- **Editor — always-editable surface** — Notion-style buttery headline, selection bubble toolbar (format-on-highlight), turn-into block conversion, Cmd+F find & replace, rich blocks (tables, callouts, toggles, syntax-highlighted code, columns), and wiki/code-safety fixes.
|
|
149
|
+
- **Wiki usability** — backlinks panel ("Linked from N documents"), outline/TOC for 3+-heading docs, hover-preview on `[[wiki links]]`, multi-tag AND filtering with clickable chips, per-doc copy link, rename-safety warning for title-form links, link-health report (broken links + orphans), recently-edited strip.
|
|
150
|
+
- **Sharing clarity** — share button reads "Share nest"; dialog clarifies nest-wide scope; deep links open documents directly.
|
|
151
|
+
- **Security** — hardened scanner gate (PolinRider + Shai-Hulud preflight) in `bin/`.
|
|
152
|
+
|
|
153
|
+
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
154
|
+
|
|
155
|
+
## What's new in 1.1.0
|
|
156
|
+
|
|
157
|
+
- **Vault import** — import an existing folder of markdown files into a new nest in one step, from the dashboard ("Import folder") or via the API. Frontmatter, wiki links, and folder structure are preserved.
|
|
158
|
+
- **Nest sharing + collaborators** — set per-nest visibility and add collaborators with read or write access. A Share affordance is now inline in the document view.
|
|
159
|
+
- **Public read-only nests** — flip a nest to `visibility=public` to serve it to unauthenticated readers (bypasses auth for GETs only); writes still require a key.
|
|
160
|
+
- **Custom logo / branding** — set `LOGO_URL` to show your own logo in the UI header and login screen. See [CONFIGURATION.md](./CONFIGURATION.md).
|
|
161
|
+
- **Governance** — nest owners can self-approve their own changes; new per-nest auto-approve toggle; role-based action gating (buttons reflect the viewer's role); stewards can edit scope during a role change.
|
|
162
|
+
- **Editor** — `[[wikilink]]` autocomplete, broken-link click creates a new doc with the title pre-filled, tag chips filter the nest list, Notion-style H1 title, click-to-edit, and an unsaved-changes warning.
|
|
163
|
+
- **Stability** — added an error boundary so a render error in one view no longer blanks the whole app; bumped `uuid` to 14.
|
|
164
|
+
|
|
165
|
+
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
166
|
+
|
|
167
|
+
## What's new in 1.0.1
|
|
168
|
+
|
|
169
|
+
- **Document hashing pipeline** — external-edit detection, conflict-aware safe-publish, and inline version diffs powered by `@promptowl/contextnest-engine`. When a file is edited outside the UI, the editor shows an "External edit detected" banner with a side-by-side diff and an adopt / keep choice.
|
|
170
|
+
- **Markdown rendering** — new `DocumentViewer` (react-markdown + remark-gfm + wikilink support) renders CLI/MCP-authored markdown correctly, with a view/edit toggle.
|
|
171
|
+
- **License revocation now blocks writes synchronously** — revoke flips an in-process "writes blocked" flag immediately; the next write returns `503`.
|
|
172
|
+
- **Dashboard stats** — new `GET /stats` endpoint surfaces nest / document / user counts.
|
|
173
|
+
- **Docker fix** — Dockerfile now installs via npm against the shipped `package-lock.json`; base image bumped to `node:22-slim`.
|
|
174
|
+
|
|
175
|
+
Full history in [CHANGELOG.md](./CHANGELOG.md).
|
|
176
|
+
|
|
177
|
+
## Licensing
|
|
178
|
+
|
|
179
|
+
ContextNest Community Edition is **commercial software**. It is **not open source**.
|
|
180
|
+
|
|
181
|
+
**You may:**
|
|
182
|
+
- Install and run the Software on devices You own or control
|
|
183
|
+
- Use the Software for internal business purposes, tied to a valid PromptOwl account
|
|
184
|
+
- Make backup and archival copies
|
|
185
|
+
|
|
186
|
+
**You may not:**
|
|
187
|
+
- Redistribute, resell, rent, lease, or sublicense the Software
|
|
188
|
+
- Offer the Software as a hosted, managed, or software-as-a-service product to third parties
|
|
189
|
+
- Reverse engineer, decompile, or create derivative works
|
|
190
|
+
- Use the Software to build a competing product or service
|
|
191
|
+
- Remove copyright, trademark, or license notices
|
|
192
|
+
|
|
193
|
+
Full license text: [LICENSE.md](./LICENSE.md)
|
|
194
|
+
|
|
195
|
+
**For redistribution, hosted-service, OEM, or regulated-industry use,** contact **hoot@promptowl.ai** for a commercial license agreement.
|
|
196
|
+
|
|
197
|
+
## Platform terms
|
|
198
|
+
|
|
199
|
+
Because the Software requires a PromptOwl account, the following terms also apply to Your use:
|
|
200
|
+
|
|
201
|
+
- **End User License Agreement** — <https://promptowl.ai/eula/>
|
|
202
|
+
- **Terms of Service** — <https://promptowl.ai/terms-of-service/>
|
|
203
|
+
- **Privacy Policy** — <https://promptowl.ai/privacy-policy/>
|
|
204
|
+
- **Acceptable Use Policy** — <https://promptowl.ai/acceptable-use/>
|
|
205
|
+
- **Disclaimer** — <https://promptowl.ai/disclaimer/>
|
|
206
|
+
- **Cookie Policy** — <https://promptowl.ai/cookies/>
|
|
207
|
+
|
|
208
|
+
## Support
|
|
209
|
+
|
|
210
|
+
- **Documentation:** <https://promptowl.ai/contextnest/>
|
|
211
|
+
- **Product questions:** <https://promptowl.ai/contact-us/>
|
|
212
|
+
- **Support & bugs:** `hoot@promptowl.ai`
|
|
213
|
+
- **Commercial licensing:** `hoot@promptowl.ai` (subject: *ContextNest Commercial License*)
|
|
214
|
+
|
|
215
|
+
## AI output disclaimer
|
|
216
|
+
|
|
217
|
+
The Software injects content into large language models. AI output may be inaccurate, incomplete, or inappropriate for your use case. You are responsible for reviewing and validating any AI-generated content before relying on it, particularly in business-critical or regulated contexts. Do not deploy the Software in medical, legal, financial-advisory, or safety-critical environments without appropriate human oversight.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
**Copyright © 2026 Promptowl LLC.** All rights reserved.
|
|
222
|
+
"ContextNest" and "PromptOwl" are trademarks of Promptowl LLC.
|
|
223
|
+
|
|
224
|
+
Promptowl LLC · 3060 Mercer University Dr Ste 110 · Atlanta, GA 30341 · USA
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/db/adapter.postgres.ts
|
|
2
|
+
function translatePlaceholders(sql) {
|
|
3
|
+
let out = "";
|
|
4
|
+
let inStr = false;
|
|
5
|
+
let n = 0;
|
|
6
|
+
for (let i = 0; i < sql.length; i++) {
|
|
7
|
+
const ch = sql[i];
|
|
8
|
+
if (ch === "'") {
|
|
9
|
+
inStr = !inStr;
|
|
10
|
+
out += ch;
|
|
11
|
+
} else if (ch === "?" && !inStr) {
|
|
12
|
+
out += "$" + ++n;
|
|
13
|
+
} else {
|
|
14
|
+
out += ch;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
var PgQuerier = class {
|
|
20
|
+
constructor(q) {
|
|
21
|
+
this.q = q;
|
|
22
|
+
}
|
|
23
|
+
q;
|
|
24
|
+
async get(sql, params = []) {
|
|
25
|
+
const res = await this.q.query(translatePlaceholders(sql), params);
|
|
26
|
+
return res.rows[0];
|
|
27
|
+
}
|
|
28
|
+
async all(sql, params = []) {
|
|
29
|
+
const res = await this.q.query(translatePlaceholders(sql), params);
|
|
30
|
+
return res.rows;
|
|
31
|
+
}
|
|
32
|
+
async run(sql, params = []) {
|
|
33
|
+
const res = await this.q.query(translatePlaceholders(sql), params);
|
|
34
|
+
return { changes: res.rowCount ?? 0 };
|
|
35
|
+
}
|
|
36
|
+
async exec(sql) {
|
|
37
|
+
await this.q.query(sql);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var PostgresAdapter = class extends PgQuerier {
|
|
41
|
+
constructor(pool) {
|
|
42
|
+
super(pool);
|
|
43
|
+
this.pool = pool;
|
|
44
|
+
}
|
|
45
|
+
pool;
|
|
46
|
+
dialect = "postgres";
|
|
47
|
+
async transaction(fn) {
|
|
48
|
+
const client = await this.pool.connect();
|
|
49
|
+
try {
|
|
50
|
+
await client.query("BEGIN");
|
|
51
|
+
const result = await fn(new PgQuerier(client));
|
|
52
|
+
await client.query("COMMIT");
|
|
53
|
+
return result;
|
|
54
|
+
} catch (err) {
|
|
55
|
+
try {
|
|
56
|
+
await client.query("ROLLBACK");
|
|
57
|
+
} catch {
|
|
58
|
+
}
|
|
59
|
+
throw err;
|
|
60
|
+
} finally {
|
|
61
|
+
client.release();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async close() {
|
|
65
|
+
await this.pool.end();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
PostgresAdapter,
|
|
70
|
+
translatePlaceholders
|
|
71
|
+
};
|