@nacre.work/core 0.0.0 → 0.1.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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/dist/authz/filter.d.ts +54 -3
- package/dist/authz/filter.d.ts.map +1 -1
- package/dist/authz/filter.js +45 -9
- package/dist/authz/filter.js.map +1 -1
- package/dist/authz/index.d.ts +2 -2
- package/dist/authz/index.d.ts.map +1 -1
- package/dist/authz/index.js +1 -1
- package/dist/authz/index.js.map +1 -1
- package/dist/config.d.ts +33 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +137 -3
- package/dist/config.js.map +1 -1
- package/dist/db/client.d.ts +39 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +82 -0
- package/dist/db/client.js.map +1 -1
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +49 -0
- package/dist/db/migrate.js.map +1 -1
- package/dist/index.d.ts +15 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/lifecycle.d.ts +57 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +97 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/metadata.d.ts +50 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +127 -0
- package/dist/metadata.js.map +1 -0
- package/dist/metrics.d.ts +18 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/metrics.js +77 -2
- package/dist/metrics.js.map +1 -1
- package/dist/migrations/0008_authenticating_lookup.sql +124 -0
- package/dist/migrations/0009_refresh_tokens.sql +73 -0
- package/dist/migrations/0010_definer_search_path.sql +22 -0
- package/dist/migrations/0011_sweep_lease.sql +36 -0
- package/dist/migrations/0012_prune.sql +118 -0
- package/dist/migrations/0013_reindex.sql +65 -0
- package/dist/oauth.d.ts +45 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +53 -0
- package/dist/oauth.js.map +1 -0
- package/dist/observability.d.ts.map +1 -1
- package/dist/observability.js +81 -13
- package/dist/observability.js.map +1 -1
- package/dist/passwords.d.ts +37 -0
- package/dist/passwords.d.ts.map +1 -0
- package/dist/passwords.js +234 -0
- package/dist/passwords.js.map +1 -0
- package/dist/redis.d.ts +46 -0
- package/dist/redis.d.ts.map +1 -0
- package/dist/redis.js +234 -0
- package/dist/redis.js.map +1 -0
- package/dist/reindex.d.ts +87 -0
- package/dist/reindex.d.ts.map +1 -0
- package/dist/reindex.js +97 -0
- package/dist/reindex.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/vector/query.d.ts +49 -4
- package/dist/vector/query.d.ts.map +1 -1
- package/dist/vector/query.js +43 -10
- package/dist/vector/query.js.map +1 -1
- package/dist/vector/search.d.ts +109 -4
- package/dist/vector/search.d.ts.map +1 -1
- package/dist/vector/search.js +166 -7
- package/dist/vector/search.js.map +1 -1
- package/package.json +26 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Nacre
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Nacre
|
|
2
|
+
Copyright 2026 Nacre
|
|
3
|
+
|
|
4
|
+
This product includes software developed at Nacre (https://nacre.work).
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0. See LICENSE.
|
|
7
|
+
|
|
8
|
+
"Nacre" and the Nacre mark are trademarks. Section 6 of the Apache License
|
|
9
|
+
grants no trademark rights; permitted use is described in TRADEMARK.md.
|
package/dist/authz/filter.d.ts
CHANGED
|
@@ -25,12 +25,12 @@ export interface VectorFilter {
|
|
|
25
25
|
export type FilterClause = {
|
|
26
26
|
readonly key: string;
|
|
27
27
|
readonly match: {
|
|
28
|
-
readonly value: string | boolean;
|
|
28
|
+
readonly value: string | number | boolean;
|
|
29
29
|
};
|
|
30
30
|
} | {
|
|
31
31
|
readonly key: string;
|
|
32
32
|
readonly match: {
|
|
33
|
-
readonly any: readonly string[];
|
|
33
|
+
readonly any: readonly (string | number | boolean)[];
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
@@ -56,5 +56,56 @@ export type QueryablePlan = Exclude<AccessPlan, {
|
|
|
56
56
|
* Omitting it from one branch is a leak, and the branches are far enough apart
|
|
57
57
|
* in the query document for that to look like a formatting difference.
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* A restriction the *caller* asked for, on top of the one the permissions
|
|
61
|
+
* impose.
|
|
62
|
+
*
|
|
63
|
+
* Only ever narrowing, and the type is what says so: a list of layer ids that
|
|
64
|
+
* results must be in. It becomes a `must` clause, which intersects with the
|
|
65
|
+
* permission `should` rather than replacing it — a caller asking for a layer
|
|
66
|
+
* they cannot read still gets nothing from it, because both constraints apply.
|
|
67
|
+
*
|
|
68
|
+
* The alternative shape, and the one to avoid, is narrowing `plan.layers`
|
|
69
|
+
* before building. That looks equivalent and is not: a scoped plan also carries
|
|
70
|
+
* `extraDocs` from document-level grants, which sit in the same `should`, so
|
|
71
|
+
* narrowing the plan would leave those documents matching regardless of which
|
|
72
|
+
* layers the caller asked for. `must` is the constraint the caller meant.
|
|
73
|
+
*
|
|
74
|
+
* An empty list must never reach here. `[]` as a `must` on `layer_id` matches
|
|
75
|
+
* nothing at all, which is the right answer for "you asked for layers you
|
|
76
|
+
* cannot read" — but it is the caller's job to spot that and skip the query, so
|
|
77
|
+
* that "no such layer" and "no permitted results" stay the same answer. This
|
|
78
|
+
* function refuses it rather than encoding the distinction.
|
|
79
|
+
*/
|
|
80
|
+
/** A value a caller may narrow a search to. Scalars and lists of them, nothing else. */
|
|
81
|
+
export type MetadataValue = string | number | boolean | readonly (string | number | boolean)[];
|
|
82
|
+
/**
|
|
83
|
+
* Where a caller's metadata lands in the vector payload.
|
|
84
|
+
*
|
|
85
|
+
* Every key a caller supplies is written and read under this one object, so
|
|
86
|
+
* `meta.org_id` is a different field from `org_id` and there is no key a caller
|
|
87
|
+
* can choose that reaches a permission field. That is the whole reason for the
|
|
88
|
+
* prefix: without it, `filters: {"deleted": false}` would be a caller reaching
|
|
89
|
+
* invariant I5's clause, and `metadata: {"acl_tags": [...]}` on ingest would be
|
|
90
|
+
* a caller writing their own permission tags.
|
|
91
|
+
*
|
|
92
|
+
* Structural, not a check. A denylist of forbidden keys would have to stay in
|
|
93
|
+
* step with every payload field ever added; a namespace cannot fall out of step
|
|
94
|
+
* with anything.
|
|
95
|
+
*/
|
|
96
|
+
export declare const METADATA_PREFIX = "meta";
|
|
97
|
+
export interface Narrowing {
|
|
98
|
+
readonly layers?: readonly string[];
|
|
99
|
+
/**
|
|
100
|
+
* Document metadata the caller asked to restrict to, key to value.
|
|
101
|
+
*
|
|
102
|
+
* Equality only, and every entry becomes a `must` — so like `layers`, this can
|
|
103
|
+
* only ever remove results. There is deliberately no negation, no range and no
|
|
104
|
+
* disjunction across keys: each of those is a way to *widen* if it is ever
|
|
105
|
+
* composed wrongly, and none of them is needed to answer "only documents from
|
|
106
|
+
* this source".
|
|
107
|
+
*/
|
|
108
|
+
readonly metadata?: Readonly<Record<string, MetadataValue>>;
|
|
109
|
+
}
|
|
110
|
+
export declare function buildFilter(orgId: string, plan: QueryablePlan, narrow?: Narrowing): VectorFilter;
|
|
60
111
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../authz/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAA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;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEjE;;;;;;;;;;;GAWG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wFAAwF;AACxF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAA;AAE9F;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,SAAS,CAAA;AAErC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC;;;;;;;;OAQG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAA;CAC5D;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,EACnB,MAAM,CAAC,EAAE,SAAS,GACjB,YAAY,CAkFd"}
|
package/dist/authz/filter.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Where a caller's metadata lands in the vector payload.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Every key a caller supplies is written and read under this one object, so
|
|
5
|
+
* `meta.org_id` is a different field from `org_id` and there is no key a caller
|
|
6
|
+
* can choose that reaches a permission field. That is the whole reason for the
|
|
7
|
+
* prefix: without it, `filters: {"deleted": false}` would be a caller reaching
|
|
8
|
+
* invariant I5's clause, and `metadata: {"acl_tags": [...]}` on ingest would be
|
|
9
|
+
* a caller writing their own permission tags.
|
|
8
10
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Structural, not a check. A denylist of forbidden keys would have to stay in
|
|
12
|
+
* step with every payload field ever added; a namespace cannot fall out of step
|
|
13
|
+
* with anything.
|
|
12
14
|
*/
|
|
13
|
-
export
|
|
15
|
+
export const METADATA_PREFIX = 'meta';
|
|
16
|
+
export function buildFilter(orgId, plan, narrow) {
|
|
14
17
|
// org_id and deleted are unconditional.
|
|
15
18
|
//
|
|
16
19
|
// org_id is duplicated in the payload even when each tenant has its own
|
|
@@ -25,6 +28,39 @@ export function buildFilter(orgId, plan) {
|
|
|
25
28
|
{ key: 'org_id', match: { value: orgId } },
|
|
26
29
|
{ key: 'deleted', match: { value: false } },
|
|
27
30
|
];
|
|
31
|
+
if (narrow?.layers !== undefined) {
|
|
32
|
+
if (narrow.layers.length === 0) {
|
|
33
|
+
// See Narrowing. An empty `any` is not "match nothing" in Qdrant, it is a
|
|
34
|
+
// clause that matches nothing *usefully* — and relying on that would put
|
|
35
|
+
// the "the caller asked for a layer they cannot see" case in the query
|
|
36
|
+
// builder, where it becomes one refactor away from being dropped. The
|
|
37
|
+
// caller returns no results without querying.
|
|
38
|
+
throw new Error('refusing to build a filter narrowed to no layers — the caller must ' +
|
|
39
|
+
'return an empty result instead of querying');
|
|
40
|
+
}
|
|
41
|
+
// A `must`, so it intersects with the permission constraint rather than
|
|
42
|
+
// replacing it. This can only ever remove results.
|
|
43
|
+
must.push({ key: 'layer_id', match: { any: [...narrow.layers] } });
|
|
44
|
+
}
|
|
45
|
+
for (const [key, value] of Object.entries(narrow?.metadata ?? {})) {
|
|
46
|
+
// Namespaced, always. The caller chooses the key and never the field: a
|
|
47
|
+
// filter on `deleted` becomes a filter on `meta.deleted`, which is a
|
|
48
|
+
// different field and cannot touch invariant I5's clause.
|
|
49
|
+
const field = `${METADATA_PREFIX}.${key}`;
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
if (value.length === 0) {
|
|
52
|
+
// Same refusal as an empty layer list, for the same reason: an empty
|
|
53
|
+
// `any` is not "match nothing" in Qdrant. The caller decides what an
|
|
54
|
+
// impossible restriction means, and answers empty without querying.
|
|
55
|
+
throw new Error(`refusing to build a filter narrowed to no values for ${key} — the ` +
|
|
56
|
+
'caller must return an empty result instead of querying');
|
|
57
|
+
}
|
|
58
|
+
must.push({ key: field, match: { any: [...value] } });
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
must.push({ key: field, match: { value: value } });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
28
64
|
if (plan.kind === 'all')
|
|
29
65
|
return { must };
|
|
30
66
|
// Only non-empty lists become clauses. An empty `any` adds nothing and an
|
package/dist/authz/filter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../authz/filter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../authz/filter.ts"],"names":[],"mappings":"AA+EA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAA;AAgBrC,MAAM,UAAU,WAAW,CACzB,KAAa,EACb,IAAmB,EACnB,MAAkB;IAElB,wCAAwC;IACxC,EAAE;IACF,wEAAwE;IACxE,wEAAwE;IACxE,uCAAuC;IACvC,EAAE;IACF,2EAA2E;IAC3E,qEAAqE;IACrE,yEAAyE;IACzE,eAAe;IACf,MAAM,IAAI,GAAmB;QAC3B,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAC1C,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;KAC5C,CAAA;IAED,IAAI,MAAM,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,0EAA0E;YAC1E,yEAAyE;YACzE,uEAAuE;YACvE,sEAAsE;YACtE,8CAA8C;YAC9C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AAM,GAAG,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACzF,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAE7F,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,wEAAwE;QACxE,uEAAuE;QACvE,yEAAyE;QACzE,2EAA2E;QAC3E,sEAAsE;QACtE,MAAM,IAAI,KAAK,CACb,0EAA0E;YACxE,qDAAqD,CACxD,CAAA;IACH,CAAC;IAED,OAAO;QACL,IAAI;QACJ,MAAM;QACN,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YAC5B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE;YACpE,CAAC,CAAC,EAAE,CAAC;KACR,CAAA;AACH,CAAC"}
|
package/dist/authz/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { resolve } from './resolve.js';
|
|
|
5
5
|
export type { AccessPlan, ResolveInput } from './resolve.js';
|
|
6
6
|
export { referenceAllows } from './reference.js';
|
|
7
7
|
export type { ReferenceInput } from './reference.js';
|
|
8
|
-
export { buildFilter } from './filter.js';
|
|
9
|
-
export type { FilterClause, QueryablePlan, VectorFilter } from './filter.js';
|
|
8
|
+
export { buildFilter, METADATA_PREFIX } from './filter.js';
|
|
9
|
+
export type { FilterClause, MetadataValue, Narrowing, QueryablePlan, VectorFilter } from './filter.js';
|
|
10
10
|
export { ancestry, MemoryScopeTree } from './scope-tree.js';
|
|
11
11
|
export type { ScopeTree, ScopeTreeData } from './scope-tree.js';
|
|
12
12
|
export { aclTags, principalTag, DEFAULT_TAG_BYTES } from './tags.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC1D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC3D,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACvF,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/authz/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { implied, satisfies } from './permissions.js';
|
|
|
2
2
|
export { effectivePrincipals, MemoryGroupGraph } from './principals.js';
|
|
3
3
|
export { resolve } from './resolve.js';
|
|
4
4
|
export { referenceAllows } from './reference.js';
|
|
5
|
-
export { buildFilter } from './filter.js';
|
|
5
|
+
export { buildFilter, METADATA_PREFIX } from './filter.js';
|
|
6
6
|
export { ancestry, MemoryScopeTree } from './scope-tree.js';
|
|
7
7
|
export { aclTags, principalTag, DEFAULT_TAG_BYTES } from './tags.js';
|
|
8
8
|
export { cachedEffectivePrincipals, MemoryCache, principalsCacheKey } from './cache.js';
|
package/dist/authz/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../authz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/config.d.ts
CHANGED
|
@@ -17,6 +17,17 @@
|
|
|
17
17
|
export interface Config {
|
|
18
18
|
readonly env: 'development' | 'production';
|
|
19
19
|
readonly canonicalUrl: string;
|
|
20
|
+
/**
|
|
21
|
+
* The identity provider in front of this installation, if there is one.
|
|
22
|
+
*
|
|
23
|
+
* Optional and empty by default, because a self-hosted Nacre usually has no
|
|
24
|
+
* OAuth authorization server at all: sign-in is email and password, and an
|
|
25
|
+
* agent presents a service account key. Named here only so the RFC 9728
|
|
26
|
+
* discovery document can point a client at the right place when a deployment
|
|
27
|
+
* *does* have one — see packages/core/oauth.ts for why pointing it at
|
|
28
|
+
* ourselves would be worse than leaving it out.
|
|
29
|
+
*/
|
|
30
|
+
readonly oauthAuthorizationServer: string;
|
|
20
31
|
readonly logLevel: string;
|
|
21
32
|
readonly logFormat: 'json' | 'text';
|
|
22
33
|
readonly pgUrl: string;
|
|
@@ -31,9 +42,11 @@ export interface Config {
|
|
|
31
42
|
readonly parserEndpoint: string;
|
|
32
43
|
readonly rerankerEndpoint: string | undefined;
|
|
33
44
|
readonly rerankerEnabled: boolean;
|
|
45
|
+
readonly rerankCandidates: number;
|
|
34
46
|
readonly jwtIssuer: string;
|
|
35
47
|
readonly jwtAudience: string;
|
|
36
48
|
readonly accessTokenTtl: number;
|
|
49
|
+
readonly refreshTokenTtl: number;
|
|
37
50
|
readonly aclCacheTtl: number;
|
|
38
51
|
readonly aclPropagationSla: number;
|
|
39
52
|
readonly aclTagHashBytes: number;
|
|
@@ -59,10 +72,30 @@ export interface Config {
|
|
|
59
72
|
readonly indexMaxAttempts: number;
|
|
60
73
|
readonly rateSearchPerMin: number;
|
|
61
74
|
readonly rateIngestPerHour: number;
|
|
75
|
+
readonly rateLoginPer15Min: number;
|
|
76
|
+
readonly rateLoginSourcePer15Min: number;
|
|
77
|
+
readonly trustProxy: number;
|
|
78
|
+
readonly metricsToken: string | undefined;
|
|
62
79
|
readonly maxDocumentBytes: number;
|
|
63
80
|
readonly auditRetentionDays: number;
|
|
64
81
|
readonly auditQueryText: boolean;
|
|
65
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* The keys a token may be verified against, and the one it is signed with.
|
|
85
|
+
*
|
|
86
|
+
* Here rather than in each process because `api` and `mcp` verify with the same
|
|
87
|
+
* secret and must never disagree about which keys are current. Two copies of
|
|
88
|
+
* this function are two chances for a rotation to reach one and not the other,
|
|
89
|
+
* which produces 401s on part of the traffic and not the rest — the hardest
|
|
90
|
+
* failure of the set to read from outside.
|
|
91
|
+
*/
|
|
92
|
+
export interface JwtKeys {
|
|
93
|
+
/** Everything issued from now on is signed with this. */
|
|
94
|
+
readonly key: Uint8Array;
|
|
95
|
+
/** Accepted on verification, never used to sign. Empty outside a rotation. */
|
|
96
|
+
readonly alsoAccept: readonly Uint8Array[];
|
|
97
|
+
}
|
|
98
|
+
export declare function loadJwtKeys(env?: NodeJS.ProcessEnv): JwtKeys;
|
|
66
99
|
export declare class ConfigError extends Error {
|
|
67
100
|
readonly problems: readonly string[];
|
|
68
101
|
constructor(problems: readonly string[]);
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,YAAY,CAAA;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IAEnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,aAAa,EAAE,YAAY,GAAG,QAAQ,CAAA;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IAEjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,MAAM;IACrB,Q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