@promptowl/contextnest-community 1.24.0 → 1.26.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 (125) hide show
  1. package/API.md +177 -14
  2. package/CONFIGURATION.md +577 -116
  3. package/README.md +4 -3
  4. package/STEWARDSHIP.md +24 -0
  5. package/dist/{chunk-XUIWAWDO.js → chunk-2QOJE7A5.js} +4 -4
  6. package/dist/{chunk-2TPQTN4Y.js → chunk-DGPTJXIV.js} +47 -15
  7. package/dist/chunk-I5EDEZBQ.js +523 -0
  8. package/dist/{chunk-ZTT4U4NE.js → chunk-IEAWRHMV.js} +99 -12
  9. package/dist/{chunk-YVMSM7LS.js → chunk-LHWOJPFE.js} +7 -0
  10. package/dist/{chunk-5EZOPA47.js → chunk-M6PGYMBD.js} +20 -11
  11. package/dist/{chunk-F66VCBLA.js → chunk-PICUHQEM.js} +51 -2
  12. package/dist/{chunk-I3CSD6CK.js → chunk-RPGFHESR.js} +2 -2
  13. package/dist/{chunk-KIAAEHWL.js → chunk-SWA5M5XX.js} +88 -546
  14. package/dist/{chunk-LA3VTQ22.js → chunk-TRSGPS27.js} +81 -14
  15. package/dist/{engine-S3QBQ7LH.js → engine-QNMFDIBV.js} +4 -3
  16. package/dist/{external-edit-service-6FNFPOJJ.js → external-edit-service-4MEGPT4D.js} +5 -4
  17. package/dist/{grants-service-UT3EQ3R7.js → grants-service-24GLUBY4.js} +3 -3
  18. package/dist/index.js +1739 -583
  19. package/dist/invited-user-AM6A3WGO.js +12 -0
  20. package/dist/{migrations.postgres-AIQ7WSU7.js → migrations.postgres-HGSQ7IA5.js} +16 -2
  21. package/dist/{review-service-HHGOTO6P.js → review-service-2EWN7WWO.js} +8 -7
  22. package/dist/{stewardship-service-4DHNRULG.js → stewardship-service-TDZUC2Q6.js} +7 -4
  23. package/dist/{version-service-KIOQME6U.js → version-service-C3JTZLJH.js} +5 -4
  24. package/dist/web3/assets/ActivityTracePage-DzwWIjjx.js +1 -0
  25. package/dist/web3/assets/{AgentDocsPage-CIiaBqMy.js → AgentDocsPage-ixP2UdAE.js} +1 -1
  26. package/dist/web3/assets/CollaboratorManager-C9VAXZ0h.js +1 -0
  27. package/dist/web3/assets/CollaboratorsTab-tq4ZTexH.js +1 -0
  28. package/dist/web3/assets/DocumentEditor-C2CP2fiE.js +36 -0
  29. package/dist/web3/assets/DocumentsTab-Mh7KxUoB.js +6 -0
  30. package/dist/web3/assets/ExternalEditsTab-B_CWKXZ_.js +1 -0
  31. package/dist/web3/assets/MarkdownEditor-CKh4WSn-.js +653 -0
  32. package/dist/web3/assets/MarkdownEditor-ndtIx5x0.css +1 -0
  33. package/dist/web3/assets/NestPageHeader-Cizo8nUi.js +1 -0
  34. package/dist/web3/assets/NestView-EW-sraEb.js +73 -0
  35. package/dist/web3/assets/OverviewTab-CjidsMX_.js +6 -0
  36. package/dist/web3/assets/PersonCombobox-BKI7dff4.js +1 -0
  37. package/dist/web3/assets/{ReviewActions-OfOdqzCn.js → ReviewActions-CS8JXgXF.js} +2 -2
  38. package/dist/web3/assets/ReviewTab-CwVrXzw5.js +1 -0
  39. package/dist/web3/assets/StewardsTab-C-iP6gnh.js +1 -0
  40. package/dist/web3/assets/SubmitForReviewModal-Biq3m79i.js +1 -0
  41. package/dist/web3/assets/{alert-dialog-DTozKlmV.js → alert-dialog-BvF3NFr7.js} +2 -2
  42. package/dist/web3/assets/{arrow-left-BCKt4CwQ.js → arrow-left-CWIsv-sG.js} +1 -1
  43. package/dist/web3/assets/backlinks-Cqcn7n1J.js +19 -0
  44. package/dist/web3/assets/boxes-ClbgQqG2.js +6 -0
  45. package/dist/web3/assets/{chevron-left-BPwUT9DS.js → chevron-left-CK_ZPFm9.js} +1 -1
  46. package/dist/web3/assets/{circle-check-DI8IBGeo.js → circle-check-Bw_aTXiH.js} +1 -1
  47. package/dist/web3/assets/{circle-x-VKVhC88W.js → circle-x-DkIG68H7.js} +1 -1
  48. package/dist/web3/assets/client-attribution-BraarYaP.js +1 -0
  49. package/dist/web3/assets/{code-xml-CMabYZvH.js → code-xml-BlR7EN6l.js} +1 -1
  50. package/dist/web3/assets/{corner-down-right-BGxwK6wH.js → corner-down-right-DSVxK3tf.js} +1 -1
  51. package/dist/web3/assets/count-skeleton-DToLM74B.js +1 -0
  52. package/dist/web3/assets/{earth-BEp1EKTo.js → earth-BXhVPvCR.js} +1 -1
  53. package/dist/web3/assets/{file-exclamation-point-r8qZGIjP.js → file-exclamation-point-BevGZgtj.js} +1 -1
  54. package/dist/web3/assets/{folder-input-Cmtx1Jhk.js → folder-input-m8UBV4fA.js} +1 -1
  55. package/dist/web3/assets/{index-C1wTSjfP.js → index-BOVYgMvj.js} +1 -1
  56. package/dist/web3/assets/index-DVnaYqj9.css +1 -0
  57. package/dist/web3/assets/index-WYDmEOfO.js +404 -0
  58. package/dist/web3/assets/page-B6pkc9cd.js +2 -0
  59. package/dist/web3/assets/page-BJrFCKXB.js +1 -0
  60. package/dist/web3/assets/page-Bgy9Ng9p.js +1 -0
  61. package/dist/web3/assets/page-C2zoxumw.js +1 -0
  62. package/dist/web3/assets/page-CJWO06dN.js +1 -0
  63. package/dist/web3/assets/page-CptuAPJc.js +6 -0
  64. package/dist/web3/assets/page-DPY01SOj.js +1 -0
  65. package/dist/web3/assets/page-Dea2SblF.js +9 -0
  66. package/dist/web3/assets/page-Deq6IKiN.js +6 -0
  67. package/dist/web3/assets/page-Dfjg8p7Z.js +1 -0
  68. package/dist/web3/assets/{page-ByyVLDVo.js → page-Dh57L0RG.js} +5 -5
  69. package/dist/web3/assets/page-Dwbp4Seu.js +6 -0
  70. package/dist/web3/assets/{page-CHb0F5hV.js → page-DzKwP5Ds.js} +3 -3
  71. package/dist/web3/assets/page-YxjrE5b5.js +45 -0
  72. package/dist/web3/assets/{page-title-ClvvBsIo.js → page-title-DVq4qvMR.js} +1 -1
  73. package/dist/web3/assets/{play-C5YNKpAH.js → play-CXhS6Pgq.js} +1 -1
  74. package/dist/web3/assets/{send-0CHvmluT.js → send-DdfwnIrj.js} +1 -1
  75. package/dist/web3/assets/{settings-CeeF4LEb.js → settings-DKX0Q4gO.js} +1 -1
  76. package/dist/web3/assets/{share-2-CMnOlOt-.js → share-2-CxmXRt58.js} +1 -1
  77. package/dist/web3/assets/{tag-DQ_6J5Gv.js → tag-DeYC_mRv.js} +1 -1
  78. package/dist/web3/assets/{trash-2-HBi-Pslz.js → trash-2-B0HyPTnI.js} +1 -1
  79. package/dist/web3/assets/{user-plus-CvBNcpn4.js → user-plus-Ckm_Isyc.js} +1 -1
  80. package/dist/web3/assets/{x-By7piikG.js → x-mNtADYHc.js} +1 -1
  81. package/dist/web3/assets/zap-D2ifcnYb.js +16 -0
  82. package/dist/web3/index.html +2 -2
  83. package/package.json +3 -2
  84. package/dist/client-KEY4PYJH.js +0 -11
  85. package/dist/keys-CTOGAG3W.js +0 -20
  86. package/dist/web3/assets/ActivityTracePage-BOZHgJ8S.js +0 -1
  87. package/dist/web3/assets/CollaboratorManager-By91wrIr.js +0 -1
  88. package/dist/web3/assets/CollaboratorsTab-D1EE64Fs.js +0 -1
  89. package/dist/web3/assets/DocumentEditor-DrQfrW3d.js +0 -36
  90. package/dist/web3/assets/DocumentsTab-Vba-AzBv.js +0 -6
  91. package/dist/web3/assets/ExternalEditsTab-BSzAQIGM.js +0 -1
  92. package/dist/web3/assets/MarkdownEditor-74N_naNQ.css +0 -1
  93. package/dist/web3/assets/MarkdownEditor-C9zqZjC5.js +0 -643
  94. package/dist/web3/assets/NestPageHeader-CoLUV1Oz.js +0 -1
  95. package/dist/web3/assets/NestView-CTZ55tXD.js +0 -63
  96. package/dist/web3/assets/OverviewTab-Dxi-Hu-N.js +0 -1
  97. package/dist/web3/assets/PersonCombobox-CPOlNs6G.js +0 -1
  98. package/dist/web3/assets/ReasonDialog-DgLxfRWv.js +0 -1
  99. package/dist/web3/assets/ReviewTab-CyX8yxd3.js +0 -1
  100. package/dist/web3/assets/StewardsTab-DBEEfAQI.js +0 -1
  101. package/dist/web3/assets/SubmitForReviewModal-Ci2DdWs0.js +0 -1
  102. package/dist/web3/assets/backlinks-CYd4xENL.js +0 -24
  103. package/dist/web3/assets/card-XG2dP5Xf.js +0 -1
  104. package/dist/web3/assets/count-skeleton-DMbdpscX.js +0 -1
  105. package/dist/web3/assets/dates-BCxbm4_q.js +0 -1
  106. package/dist/web3/assets/index-BM-h3DwI.css +0 -1
  107. package/dist/web3/assets/index-EaX2yql0.js +0 -389
  108. package/dist/web3/assets/page-B3yvQvHy.js +0 -1
  109. package/dist/web3/assets/page-BExMvttJ.js +0 -1
  110. package/dist/web3/assets/page-BUOADv2X.js +0 -1
  111. package/dist/web3/assets/page-BYUFhYWZ.js +0 -1
  112. package/dist/web3/assets/page-Bicf02Cz.js +0 -1
  113. package/dist/web3/assets/page-BsPMDm5d.js +0 -45
  114. package/dist/web3/assets/page-CC0NJi8v.js +0 -1
  115. package/dist/web3/assets/page-CPjWQNKx.js +0 -11
  116. package/dist/web3/assets/page-CQt3ZGbf.js +0 -2
  117. package/dist/web3/assets/page-Cj1NetQ-.js +0 -1
  118. package/dist/web3/assets/page-CtaW65El.js +0 -1
  119. package/dist/web3/assets/page-DGOL9l8i.js +0 -6
  120. package/dist/web3/assets/refresh-cw-BhHzSH9m.js +0 -6
  121. package/dist/web3/assets/scroll-area-dRWncRqa.css +0 -1
  122. package/dist/web3/assets/scroll-area-hz-xtayP.js +0 -1
  123. package/dist/web3/assets/select-DBFTrUmI.js +0 -6
  124. package/dist/web3/assets/triangle-alert-CDy8-7sv.js +0 -6
  125. package/dist/web3/assets/zap-C2T8riBp.js +0 -11
package/README.md CHANGED
@@ -134,7 +134,7 @@ Keys are minted in the app (Workspace → API keys, or the Connect dialog) — o
134
134
  | Custom logo / branding | ✅ | ✅ |
135
135
  | Admin password reset + user removal (in-platform) | ✅ | ✅ |
136
136
  | Wiki backlinks, outline, hover-preview, link health | ✅ | ✅ |
137
- | Rich editor — tables, callouts, toggles, code highlight, find/replace, image & video upload | ✅ | ✅ |
137
+ | Rich editor — tables, callouts, toggles, code highlight, find/replace, image & video upload, YouTube / Vimeo embeds | ✅ | ✅ |
138
138
  | Folder organization — nested folders, move documents, lazy folder tree | ✅ | ✅ |
139
139
  | Scales to large vaults — nest listings served from a document index, not a disk crawl | ✅ | ✅ |
140
140
  | Steward version revert | ✅ | ✅ |
@@ -150,7 +150,7 @@ Keys are minted in the app (Workspace → API keys, or the Connect dialog) — o
150
150
  | Activity trace — every governance action, per nest and server-wide | ✅ | ✅ |
151
151
  | Notifications — Slack, Microsoft Teams, email | ✅ | ✅ |
152
152
  | Centralized multi-tenant admin console | — | ✅ |
153
- | Single sign-on (OIDC — Entra ID, Google, Okta, Keycloak) | ✅ | ✅ |
153
+ | Single sign-on (OIDC — Entra ID, Google, Okta, Keycloak) — [admin guide](./CONFIGURATION.md#single-sign-on-oidc) | ✅ | ✅ |
154
154
  | SAML / SCIM provisioning | — | ✅ |
155
155
  | Audit log streaming | — | ✅ |
156
156
  | Policy transforms (redaction, summarization) | — | ✅ |
@@ -165,6 +165,7 @@ Release notes live in [CHANGELOG.md](./CHANGELOG.md).
165
165
  ## Documentation
166
166
 
167
167
  - [CONFIGURATION.md](./CONFIGURATION.md) — every environment variable (port, auth mode, storage, notifications, telemetry)
168
+ - [Single sign-on admin guide](./CONFIGURATION.md#single-sign-on-oidc) — connect Microsoft Entra ID, Google, Okta, Keycloak or any OIDC provider; what happens to existing accounts, API keys and agents; every `sso_error` code with its fix
168
169
  - [API.md](./API.md) — complete REST reference with request and response bodies
169
170
  - [STEWARDSHIP.md](./STEWARDSHIP.md) — the governance model: modes, stewards, scopes, prime documents, teams, super-admins
170
171
  - `<server>/llms.txt` — the agent manual the running server publishes; rendered as **Docs** in the app
@@ -217,4 +218,4 @@ The Software injects content into large language models. AI output may be inaccu
217
218
  **Copyright © 2026 Promptowl LLC.** All rights reserved.
218
219
  "ContextNest" and "PromptOwl" are trademarks of Promptowl LLC.
219
220
 
220
- Promptowl LLC · 3060 Mercer University Dr Ste 110 · Atlanta, GA 30341 · USA
221
+ Promptowl LLC · 3060 Mercer University Dr Ste 110 · Atlanta, GA 30341 · USA
package/STEWARDSHIP.md CHANGED
@@ -90,6 +90,30 @@ Prime documents carry a **Prime** badge in the nest's document list, with a tool
90
90
 
91
91
  Flipping any of this only affects **future** writes. Marking a published document prime doesn't unpublish it; the next edit is what needs approval.
92
92
 
93
+ ## Creators review their own documents (`creator_is_reviewer`)
94
+
95
+ A per-nest flag (**off** by default; nest Settings → "Creators review their own documents") for the GitHub posture: anyone with write access creates documents, and the person who created a document is the one who approves changes to it.
96
+
97
+ When it's on, creating a document in a governed nest does two things:
98
+
99
+ 1. **The author is stewarded as a document-scope `reviewer`** of that document — exactly the row an admin would otherwise add by hand (`POST /nests/:id/stewards` with `scope: "document"`, or the `documents:` section of `stewards.yaml`). The nest owner is skipped; they already approve everything.
100
+ 2. **The first version publishes immediately.** The author is the document's reviewer, so nobody else needs to bless v1. This holds for the owner too: with this on, the owner's own new documents publish at v1 whether or not `allow_self_approve` is on — the two settings are independent, and this one only ever touches v1.
101
+
102
+ The row is written **before** the publish decision, so v1 only publishes when the author really can approve the next change. If a document-scope row for the author already exists on that id with a lesser role (an admin stewarded the id ahead of time), it is left alone and v1 lands as a draft instead. If the row can't be written, the create fails with nothing written.
103
+
104
+ Everything after v1 is the ordinary review cycle, and separation of duties is untouched:
105
+
106
+ | | Who approves |
107
+ |---|---|
108
+ | A teammate edits the document | The creator (plus any tag- or nest-level reviewer, and admins) |
109
+ | The creator edits their own document | Another reviewer — the creator can't approve their own submission |
110
+
111
+ **Prime wins.** A prime document still lands as a draft: its creator is made its reviewer, but someone else has to approve the first version.
112
+
113
+ Only **future** creates are affected. Turning it on doesn't steward anyone on existing documents, and turning it off leaves every steward row it created in place — remove them from the Stewards tab like any other. Every create surface participates (the editor, the REST and MCP APIs, and `ctx push` — the pusher authored what they pushed); the derived annotations document is the one exception, since nobody authored it.
114
+
115
+ Like prime, this only applies to **governed** nests. With stewardship off there is nothing to review, so the flag is inert until you turn stewardship on.
116
+
93
117
  ## Who sees what
94
118
 
95
119
  Governance gates two things: who can **approve**, and who can **read**.
@@ -6,10 +6,10 @@ import {
6
6
  markIndexStale,
7
7
  resolveNestPath,
8
8
  syncSuggestionRows
9
- } from "./chunk-KIAAEHWL.js";
9
+ } from "./chunk-SWA5M5XX.js";
10
10
  import {
11
11
  getDb
12
- } from "./chunk-LA3VTQ22.js";
12
+ } from "./chunk-TRSGPS27.js";
13
13
 
14
14
  // src/governance/external-edit-service.ts
15
15
  import { readFile, readdir } from "fs/promises";
@@ -83,7 +83,7 @@ async function scanDocumentForDriftInternal(nestId, documentId, actor) {
83
83
  if (await bodyMatchesLatestVersion(storage, documentId, drift.actualHash)) {
84
84
  return null;
85
85
  }
86
- const { hasUnsealedDraft } = await import("./version-service-KIOQME6U.js");
86
+ const { hasUnsealedDraft } = await import("./version-service-C3JTZLJH.js");
87
87
  if (await hasUnsealedDraft(nestId, documentId)) {
88
88
  return null;
89
89
  }
@@ -254,7 +254,7 @@ async function listExternalEditVerdicts(nestId, documentId) {
254
254
  async function mirrorVersion(input) {
255
255
  const { storage } = await engineCache.get(input.nestId);
256
256
  const node = await storage.readDocument(input.documentId);
257
- const { upsertVersion, setApprovedVersion } = await import("./version-service-KIOQME6U.js");
257
+ const { upsertVersion, setApprovedVersion } = await import("./version-service-C3JTZLJH.js");
258
258
  await upsertVersion({
259
259
  nestId: input.nestId,
260
260
  nodeId: input.documentId,
@@ -1,27 +1,30 @@
1
1
  import {
2
2
  buildTitleMap,
3
- canEditWith,
4
- canViewWith,
5
- collabPermToRole,
6
3
  docLink,
7
4
  isSuperAdmin,
8
5
  nestAllowsSelfApprove,
9
6
  nestName,
10
- primaryRole,
11
7
  resolveNestAccess,
12
8
  resolveNestPermission,
13
- resolveTeamRolesForUser,
14
- sendEmailToRecipient
15
- } from "./chunk-KIAAEHWL.js";
9
+ resolveTeamRolesForUser
10
+ } from "./chunk-SWA5M5XX.js";
16
11
  import {
17
12
  ConflictError,
18
13
  ValidationError
19
- } from "./chunk-YVMSM7LS.js";
14
+ } from "./chunk-LHWOJPFE.js";
15
+ import {
16
+ canApproveWith,
17
+ canEditWith,
18
+ canViewWith,
19
+ collabPermToRole,
20
+ primaryRole,
21
+ sendEmailToRecipient
22
+ } from "./chunk-I5EDEZBQ.js";
20
23
  import {
21
24
  config,
22
25
  getDb,
23
26
  isEmailish
24
- } from "./chunk-LA3VTQ22.js";
27
+ } from "./chunk-TRSGPS27.js";
25
28
 
26
29
  // src/governance/stewardship-service.ts
27
30
  import { v4 as uuid } from "uuid";
@@ -230,12 +233,8 @@ async function createStewardRecord(params) {
230
233
  );
231
234
  let userId = userRow?.id;
232
235
  if (!userId) {
233
- const { hashPassword } = await import("./keys-CTOGAG3W.js");
234
- userId = uuid();
235
- await db.run(
236
- "INSERT INTO users (id, email, name, password_hash, is_invited) VALUES (?, ?, ?, ?, 1)",
237
- [userId, email, null, await hashPassword(uuid())]
238
- );
236
+ const { findOrCreateInvitedUser } = await import("./invited-user-AM6A3WGO.js");
237
+ userId = (await findOrCreateInvitedUser(email)).id;
239
238
  }
240
239
  const created = await assignSteward({
241
240
  nestId: params.nestId,
@@ -283,6 +282,38 @@ async function createStewardRecord(params) {
283
282
  }
284
283
  return results;
285
284
  }
285
+ async function stewardDocumentCreator(nestId, nodeId, userEmail) {
286
+ const email = userEmail.trim().toLowerCase();
287
+ if (!email) return { canApprove: false };
288
+ const ownerEmail = (await getNestOwnerEmail(nestId) || "").toLowerCase();
289
+ if (email === ownerEmail) return { canApprove: true };
290
+ const row = {
291
+ nestId,
292
+ scope: "document",
293
+ nodePattern: nodeId,
294
+ userEmail: email,
295
+ userId: await userIdForEmail(email),
296
+ role: "reviewer",
297
+ assignedBy: email,
298
+ assignedAt: (/* @__PURE__ */ new Date()).toISOString(),
299
+ isActive: true
300
+ };
301
+ try {
302
+ const created = await assignSteward(row);
303
+ return { canApprove: true, insertedId: created.id };
304
+ } catch (err) {
305
+ if (!isUniqueViolation(err)) throw err;
306
+ }
307
+ return {
308
+ canApprove: canApproveWith(
309
+ await resolveUserRoles(nestId, email, { nodeId })
310
+ )
311
+ };
312
+ }
313
+ function isUniqueViolation(err) {
314
+ const code = err?.code;
315
+ return code === "SQLITE_CONSTRAINT_UNIQUE" || code === "23505";
316
+ }
286
317
  async function resolveStewardsForNode(nestId, nodeId) {
287
318
  return (await resolve(nestId, nodeId)).stewards;
288
319
  }
@@ -638,6 +669,7 @@ export {
638
669
  getStewardsForScope,
639
670
  listStewards,
640
671
  createStewardRecord,
672
+ stewardDocumentCreator,
641
673
  resolveStewardsForNode,
642
674
  resolveStewardsWithFallback,
643
675
  getStewardRolesForUser,