@imbue-ai/detent 1.15.0 → 1.15.2
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/README.md +12 -0
- package/dist/src/schemas/generatedBuiltinSchemas.d.ts.map +1 -1
- package/dist/src/schemas/generatedBuiltinSchemas.js +745 -72
- package/dist/src/schemas/generatedBuiltinSchemas.js.map +1 -1
- package/dist/tests/builtinSchemas.test.js +255 -89
- package/dist/tests/builtinSchemas.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -169,6 +169,12 @@ In the Detent config, schemas are identified by names, like this:
|
|
|
169
169
|
}
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
Note how the `github-api` schema only matches the domain,
|
|
173
|
+
while the `github-read-issues-detent` doesn't match the domain.
|
|
174
|
+
They are supposed to be used as scopes and permissions respectively in
|
|
175
|
+
[permission rules](#permission-rules),
|
|
176
|
+
but they live in the same flat namespace.
|
|
177
|
+
|
|
172
178
|
For a complete example config that defines custom schemas, see
|
|
173
179
|
[docs/example-cloudflare.json](docs/example-cloudflare.json).
|
|
174
180
|
|
|
@@ -257,6 +263,12 @@ This is the meaning of the rules in the example above:
|
|
|
257
263
|
- When accessing the Slack API, only read actions are allowed.
|
|
258
264
|
- No other requests are allowed.
|
|
259
265
|
|
|
266
|
+
Note that the scopes and permissions come from the same flat namespace of
|
|
267
|
+
[request schema](#request-schemas).
|
|
268
|
+
A typical rule uses a schema that only matches the domain as the scope and a
|
|
269
|
+
list of schemas that don't match the domain as the permissions,
|
|
270
|
+
but that's purely a usage pattern.
|
|
271
|
+
|
|
260
272
|
### Rule resolution, default outcomes
|
|
261
273
|
|
|
262
274
|
When a request gets checked, the rules in your config are simply
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedBuiltinSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/generatedBuiltinSchemas.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"generatedBuiltinSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/generatedBuiltinSchemas.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAk3R5E,CAAC"}
|