@jevvy/permissions 0.1.0 → 0.2.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/README.md +25 -17
- package/dist/calibration-cli.d.ts +4 -2
- package/dist/calibration-cli.js +103 -103
- package/dist/calibration.d.ts +3 -3
- package/dist/config.d.ts +8 -20
- package/dist/config.js +24 -29
- package/dist/core.d.ts +2 -2
- package/dist/core.js +237 -10864
- package/dist/engine.d.ts +13 -5
- package/dist/engine.js +99 -52
- package/dist/opencode/credentials.d.ts +6 -16
- package/dist/opencode/credentials.js +16 -31
- package/dist/opencode/evaluate.d.ts +5 -2
- package/dist/opencode/evaluate.js +10 -5
- package/dist/opencode/index.d.ts +2 -2
- package/dist/opencode/index.js +51 -60
- package/dist/providers.d.ts +15 -0
- package/dist/providers.js +43 -0
- package/dist/questions.d.ts +33 -7
- package/dist/questions.js +16 -0
- package/package.json +2 -2
package/dist/questions.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { NoulAnswer, NoulQuestion } from "./core.js";
|
|
3
|
+
export const ApprovalThreshold = Schema.Struct({
|
|
4
|
+
direction: Schema.Literals(["atLeast", "atMost"]),
|
|
5
|
+
value: NoulAnswer.fields.noul,
|
|
6
|
+
});
|
|
7
|
+
export const ApprovalQuestion = Schema.Struct({
|
|
8
|
+
...NoulQuestion.fields,
|
|
9
|
+
instructions: Schema.NonEmptyString,
|
|
10
|
+
criteria: Schema.optionalKey(Schema.Struct({
|
|
11
|
+
false: Schema.NonEmptyString,
|
|
12
|
+
true: Schema.NonEmptyString,
|
|
13
|
+
})),
|
|
14
|
+
threshold: ApprovalThreshold,
|
|
15
|
+
});
|
|
16
|
+
export const ApprovalQuestions = Schema.Record(Schema.NonEmptyString, ApprovalQuestion).check(Schema.isMinProperties(1), Schema.isPropertyNames(Schema.NonEmptyString));
|
|
1
17
|
/**
|
|
2
18
|
* The shipped inquiry set is calibrated as one unit with its thresholds and
|
|
3
19
|
* pinned models. Rewording or overriding any entry creates a custom policy.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jevvy/permissions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Auto-approve shell permission requests that Jevvy judges harmless",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
42
|
"prebuild": "npm run build --workspace=@jevvy/core && node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
43
|
-
"build": "tsc -p tsconfig.build.json && esbuild src/core.ts --bundle --platform=node --format=esm --target=node24 --outfile=dist/core.js && node ../../scripts/copy-calibration-assets.mjs",
|
|
43
|
+
"build": "tsc -p tsconfig.build.json && esbuild src/core.ts --bundle --platform=node --format=esm --target=node24 --external:effect --external:effect/* --outfile=dist/core.js && node ../../scripts/copy-calibration-assets.mjs",
|
|
44
44
|
"prepack": "npm run build && node ../../scripts/package-readme.mjs prepare",
|
|
45
45
|
"postpack": "node ../../scripts/package-readme.mjs clean"
|
|
46
46
|
},
|