@promptowl/contextnest-community 1.21.0 → 1.21.1
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/{adapter.postgres-YOODX2BI.js → adapter.postgres-6VZCMPQL.js} +11 -1
- package/dist/{chunk-IGPJ74O4.js → chunk-FXYFLUE7.js} +2 -2
- package/dist/{chunk-6JGQX4GA.js → chunk-G4AL7ETF.js} +3 -3
- package/dist/{chunk-XWGEXQU3.js → chunk-IVXVOXYN.js} +1 -1
- package/dist/{chunk-N2DTJFCD.js → chunk-LL2JU5AA.js} +2 -2
- package/dist/{chunk-4KJGQHWB.js → chunk-NH7L2S6S.js} +5 -5
- package/dist/{chunk-LPPKPEYI.js → chunk-SKZ7YYT4.js} +1 -1
- package/dist/{chunk-6PJQSKKV.js → chunk-UVOAYQTU.js} +4 -4
- package/dist/{client-BD6PAUCZ.js → client-KBK4VIWJ.js} +1 -1
- package/dist/{engine-IKZQ46P7.js → engine-WXWER2V7.js} +2 -2
- package/dist/{external-edit-service-LTON57HO.js → external-edit-service-Y757EFMS.js} +3 -3
- package/dist/{grants-service-LSNZN6NG.js → grants-service-FKINSDLZ.js} +2 -2
- package/dist/index.js +11 -11
- package/dist/{review-service-6JK64IRT.js → review-service-PPR5BV5J.js} +6 -6
- package/dist/{stewardship-service-2YKGBP63.js → stewardship-service-IKC7MXLP.js} +3 -3
- package/dist/{version-service-PJV74PVQ.js → version-service-GWSDSUZR.js} +3 -3
- package/package.json +1 -1
|
@@ -5,7 +5,17 @@ function translatePlaceholders(sql) {
|
|
|
5
5
|
let n = 0;
|
|
6
6
|
for (let i = 0; i < sql.length; i++) {
|
|
7
7
|
const ch = sql[i];
|
|
8
|
-
if (ch === "
|
|
8
|
+
if (!inStr && ch === "-" && sql[i + 1] === "-") {
|
|
9
|
+
const end = sql.indexOf("\n", i);
|
|
10
|
+
const stop = end === -1 ? sql.length : end;
|
|
11
|
+
out += sql.slice(i, stop);
|
|
12
|
+
i = stop - 1;
|
|
13
|
+
} else if (!inStr && ch === "/" && sql[i + 1] === "*") {
|
|
14
|
+
const end = sql.indexOf("*/", i + 2);
|
|
15
|
+
const stop = end === -1 ? sql.length : end + 2;
|
|
16
|
+
out += sql.slice(i, stop);
|
|
17
|
+
i = stop - 1;
|
|
18
|
+
} else if (ch === "'") {
|
|
9
19
|
inStr = !inStr;
|
|
10
20
|
out += ch;
|
|
11
21
|
} else if (ch === "?" && !inStr) {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
buildTitleMap,
|
|
3
3
|
insertOrReplace,
|
|
4
4
|
nowExpr
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G4AL7ETF.js";
|
|
6
6
|
import {
|
|
7
7
|
getDb
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
9
9
|
|
|
10
10
|
// src/governance/version-service.ts
|
|
11
11
|
import { createHash } from "crypto";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
config,
|
|
9
9
|
getDb,
|
|
10
10
|
isEmailish
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
12
12
|
import {
|
|
13
13
|
ANON_USER_ID
|
|
14
14
|
} from "./chunk-YB3LKF7U.js";
|
|
@@ -2587,8 +2587,8 @@ async function ensureNodeIndex(nestId) {
|
|
|
2587
2587
|
return run;
|
|
2588
2588
|
}
|
|
2589
2589
|
async function rebuildNodeIndex(nestId) {
|
|
2590
|
-
const { engineCache: engineCache2 } = await import("./engine-
|
|
2591
|
-
const { documentsWithSuggestions } = await import("./external-edit-service-
|
|
2590
|
+
const { engineCache: engineCache2 } = await import("./engine-WXWER2V7.js");
|
|
2591
|
+
const { documentsWithSuggestions } = await import("./external-edit-service-Y757EFMS.js");
|
|
2592
2592
|
const { storage, dropDiscoveryCache } = await engineCache2.get(nestId);
|
|
2593
2593
|
dropDiscoveryCache();
|
|
2594
2594
|
const startedAt = writeGeneration.get(nestId) ?? 0;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveNestPermission,
|
|
12
12
|
resolveTeamRolesForUser,
|
|
13
13
|
sendEmailToRecipient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G4AL7ETF.js";
|
|
15
15
|
import {
|
|
16
16
|
ConflictError,
|
|
17
17
|
ValidationError
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
config,
|
|
21
21
|
getDb,
|
|
22
22
|
isEmailish
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
24
24
|
|
|
25
25
|
// src/governance/stewardship-service.ts
|
|
26
26
|
import { v4 as uuid } from "uuid";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
resolveNestWideRoles,
|
|
5
5
|
resolveStewardsForNode,
|
|
6
6
|
stewardCoverageForUser
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LL2JU5AA.js";
|
|
8
8
|
import {
|
|
9
9
|
grantCoversNode,
|
|
10
10
|
listUserGrants,
|
|
11
11
|
resolveNodeGrant
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IVXVOXYN.js";
|
|
13
13
|
import {
|
|
14
14
|
createVersion,
|
|
15
15
|
getApprovedVersion,
|
|
16
16
|
getApprovedVersions,
|
|
17
17
|
getCurrentVersion,
|
|
18
18
|
setApprovedVersion
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FXYFLUE7.js";
|
|
20
20
|
import {
|
|
21
21
|
buildDocContext,
|
|
22
22
|
buildTitleMap,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveNestPermission,
|
|
37
37
|
sendEmailToRecipient,
|
|
38
38
|
titleForNode
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-G4AL7ETF.js";
|
|
40
40
|
import {
|
|
41
41
|
ConflictError,
|
|
42
42
|
NotFoundError,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
import {
|
|
46
46
|
config,
|
|
47
47
|
getDb
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
49
49
|
|
|
50
50
|
// src/governance/review-service.ts
|
|
51
51
|
import { v4 as uuid2 } from "uuid";
|
|
@@ -1918,7 +1918,7 @@ async function initDb() {
|
|
|
1918
1918
|
if (adapter) return adapter;
|
|
1919
1919
|
if (config.DB_DRIVER === "postgres") {
|
|
1920
1920
|
const { Pool } = await import("pg");
|
|
1921
|
-
const { PostgresAdapter } = await import("./adapter.postgres-
|
|
1921
|
+
const { PostgresAdapter } = await import("./adapter.postgres-6VZCMPQL.js");
|
|
1922
1922
|
const { runPostgresMigrations } = await import("./migrations.postgres-JA2YGLS3.js");
|
|
1923
1923
|
const pool = new Pool(buildPgConfig());
|
|
1924
1924
|
adapter = new PostgresAdapter(pool);
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
markIndexStale,
|
|
6
6
|
resolveNestPath,
|
|
7
7
|
setSuggestionFlag
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G4AL7ETF.js";
|
|
9
9
|
import {
|
|
10
10
|
getDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
12
12
|
|
|
13
13
|
// src/governance/external-edit-service.ts
|
|
14
14
|
import { readFile, readdir } from "fs/promises";
|
|
@@ -82,7 +82,7 @@ async function scanDocumentForDriftInternal(nestId, documentId, actor) {
|
|
|
82
82
|
if (await bodyMatchesLatestVersion(storage, documentId, drift.actualHash)) {
|
|
83
83
|
return null;
|
|
84
84
|
}
|
|
85
|
-
const { hasUnsealedDraft } = await import("./version-service-
|
|
85
|
+
const { hasUnsealedDraft } = await import("./version-service-GWSDSUZR.js");
|
|
86
86
|
if (await hasUnsealedDraft(nestId, documentId)) {
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
@@ -259,7 +259,7 @@ async function listExternalEditVerdicts(nestId, documentId) {
|
|
|
259
259
|
async function mirrorVersion(input) {
|
|
260
260
|
const { storage } = await engineCache.get(input.nestId);
|
|
261
261
|
const node = await storage.readDocument(input.documentId);
|
|
262
|
-
const { upsertVersion, setApprovedVersion } = await import("./version-service-
|
|
262
|
+
const { upsertVersion, setApprovedVersion } = await import("./version-service-GWSDSUZR.js");
|
|
263
263
|
await upsertVersion({
|
|
264
264
|
nestId: input.nestId,
|
|
265
265
|
nodeId: input.documentId,
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
engineApi,
|
|
3
3
|
engineCache,
|
|
4
4
|
opContext
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G4AL7ETF.js";
|
|
6
6
|
import "./chunk-YVMSM7LS.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-SKZ7YYT4.js";
|
|
8
8
|
import "./chunk-YB3LKF7U.js";
|
|
9
9
|
import "./chunk-FRQJWGN3.js";
|
|
10
10
|
export {
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
scanNestForDrift,
|
|
12
12
|
startDriftScanner,
|
|
13
13
|
stopDriftScanner
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-UVOAYQTU.js";
|
|
15
|
+
import "./chunk-G4AL7ETF.js";
|
|
16
16
|
import "./chunk-YVMSM7LS.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-SKZ7YYT4.js";
|
|
18
18
|
import "./chunk-YB3LKF7U.js";
|
|
19
19
|
import "./chunk-FRQJWGN3.js";
|
|
20
20
|
export {
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
listGrants,
|
|
7
7
|
listUserGrants,
|
|
8
8
|
resolveNodeGrant
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IVXVOXYN.js";
|
|
10
10
|
import "./chunk-YVMSM7LS.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-SKZ7YYT4.js";
|
|
12
12
|
import "./chunk-YB3LKF7U.js";
|
|
13
13
|
export {
|
|
14
14
|
createGrant,
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
submitForReview,
|
|
38
38
|
withNodeWriteLock,
|
|
39
39
|
withdrawDeletionRequest
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-NH7L2S6S.js";
|
|
41
41
|
import {
|
|
42
42
|
canCreateInNest,
|
|
43
43
|
canManageStewards,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
resolveUserRoles,
|
|
58
58
|
syncFromConfig,
|
|
59
59
|
updateSteward
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LL2JU5AA.js";
|
|
61
61
|
import {
|
|
62
62
|
createGrant,
|
|
63
63
|
deleteGrant,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
listGrants,
|
|
67
67
|
listUserGrants,
|
|
68
68
|
resolveNodeGrant
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-IVXVOXYN.js";
|
|
70
70
|
import {
|
|
71
71
|
generateApiKey,
|
|
72
72
|
getKeyPrefix,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
listMyDrafts,
|
|
93
93
|
setApprovedVersion,
|
|
94
94
|
upsertVersion
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-FXYFLUE7.js";
|
|
96
96
|
import {
|
|
97
97
|
approveExternalEdit,
|
|
98
98
|
getExternalEditDetail,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
scanDocumentForDrift,
|
|
105
105
|
scanNestForDrift,
|
|
106
106
|
startDriftScanner
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-UVOAYQTU.js";
|
|
108
108
|
import {
|
|
109
109
|
addMember,
|
|
110
110
|
addWatcher,
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
updateMemberRole,
|
|
209
209
|
validateLicense,
|
|
210
210
|
verifySmtp
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-G4AL7ETF.js";
|
|
212
212
|
import {
|
|
213
213
|
AppError,
|
|
214
214
|
ConflictError,
|
|
@@ -226,7 +226,7 @@ import {
|
|
|
226
226
|
initDb,
|
|
227
227
|
isEmailListish,
|
|
228
228
|
isEmailish
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-SKZ7YYT4.js";
|
|
230
230
|
import {
|
|
231
231
|
ANON_EMAIL,
|
|
232
232
|
ANON_USER_ID,
|
|
@@ -5817,7 +5817,7 @@ nodeRoutes.post("/", async (c) => {
|
|
|
5817
5817
|
nodeRoutes.get("/:nodeId{.+}/stewards", async (c) => {
|
|
5818
5818
|
const nestId = c.req.param("nestId");
|
|
5819
5819
|
const nodeId = c.req.param("nodeId");
|
|
5820
|
-
const { resolveStewardsWithFallback: resolveStewardsWithFallback2 } = await import("./stewardship-service-
|
|
5820
|
+
const { resolveStewardsWithFallback: resolveStewardsWithFallback2 } = await import("./stewardship-service-IKC7MXLP.js");
|
|
5821
5821
|
const { stewards, fallbackToOwner, ownerEmail } = await resolveStewardsWithFallback2(
|
|
5822
5822
|
nestId,
|
|
5823
5823
|
nodeId
|
|
@@ -5838,7 +5838,7 @@ nodeRoutes.get("/:nodeId{.+}/stewards", async (c) => {
|
|
|
5838
5838
|
nodeRoutes.get("/:nodeId{.+}/reviews", async (c) => {
|
|
5839
5839
|
const nestId = c.req.param("nestId");
|
|
5840
5840
|
const nodeId = c.req.param("nodeId");
|
|
5841
|
-
const { getReviewHistory: getReviewHistory2 } = await import("./review-service-
|
|
5841
|
+
const { getReviewHistory: getReviewHistory2 } = await import("./review-service-PPR5BV5J.js");
|
|
5842
5842
|
const history = await getReviewHistory2(nestId, nodeId);
|
|
5843
5843
|
return c.json({ reviews: history });
|
|
5844
5844
|
});
|
|
@@ -9927,8 +9927,8 @@ ${list}`,
|
|
|
9927
9927
|
if (!target) return "target is required (a node id or folder prefix).";
|
|
9928
9928
|
if (!["read", "write"].includes(role)) return "role must be read or write.";
|
|
9929
9929
|
try {
|
|
9930
|
-
const { createGrant: createGrant2 } = await import("./grants-service-
|
|
9931
|
-
const db = (await import("./client-
|
|
9930
|
+
const { createGrant: createGrant2 } = await import("./grants-service-FKINSDLZ.js");
|
|
9931
|
+
const db = (await import("./client-KBK4VIWJ.js")).getDb();
|
|
9932
9932
|
const { normalizeEmail: normalizeEmail2 } = await import("./email-R7DFS6E5.js");
|
|
9933
9933
|
const e = normalizeEmail2(String(args.email || ""));
|
|
9934
9934
|
if (!e) return "email is required.";
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
requestDeletion,
|
|
18
18
|
submitForReview,
|
|
19
19
|
withdrawDeletionRequest
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NH7L2S6S.js";
|
|
21
21
|
import {
|
|
22
22
|
canUserApprove
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-LL2JU5AA.js";
|
|
24
|
+
import "./chunk-IVXVOXYN.js";
|
|
25
|
+
import "./chunk-FXYFLUE7.js";
|
|
26
|
+
import "./chunk-G4AL7ETF.js";
|
|
27
27
|
import "./chunk-YVMSM7LS.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-SKZ7YYT4.js";
|
|
29
29
|
import "./chunk-YB3LKF7U.js";
|
|
30
30
|
import "./chunk-FRQJWGN3.js";
|
|
31
31
|
export {
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
syncFromConfig,
|
|
24
24
|
updateSteward,
|
|
25
25
|
updateStewardRole
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-LL2JU5AA.js";
|
|
27
|
+
import "./chunk-G4AL7ETF.js";
|
|
28
28
|
import "./chunk-YVMSM7LS.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-SKZ7YYT4.js";
|
|
30
30
|
import "./chunk-YB3LKF7U.js";
|
|
31
31
|
import "./chunk-FRQJWGN3.js";
|
|
32
32
|
export {
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
setApprovedVersion,
|
|
21
21
|
systemAuthor,
|
|
22
22
|
upsertVersion
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-FXYFLUE7.js";
|
|
24
|
+
import "./chunk-G4AL7ETF.js";
|
|
25
25
|
import "./chunk-YVMSM7LS.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-SKZ7YYT4.js";
|
|
27
27
|
import "./chunk-YB3LKF7U.js";
|
|
28
28
|
import "./chunk-FRQJWGN3.js";
|
|
29
29
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptowl/contextnest-community",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "ContextNest Community Edition — self-hosted context governance server for AI workflows. Commercial software by Promptowl LLC.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|