@andrueandersoncs/lint-anything 0.7.0 → 0.8.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 +4 -3
- package/dist/cli.js +65 -65
- package/dist/lib.js +212 -13
- package/dist/types/decision-model.d.ts +15 -0
- package/dist/types/lib.d.ts +2 -2
- package/dist/types/score.d.ts +22 -0
- package/package.json +1 -1
- package/skills/lint-anything/SKILL.md +2 -2
- package/skills/lint-anything/scripts/score.js +43 -43
package/README.md
CHANGED
|
@@ -242,12 +242,13 @@ The package also exports the stages a run composes as an [Effect](https://effect
|
|
|
242
242
|
| `DecisionModel.ask(source, state, questions)` | Yes/no questions under a shared state, packed, cached, retried; no policy needed |
|
|
243
243
|
| `DecisionModel.layer(cacheDirectory?)` | The `DecisionModel` service for the model the environment variables above configure (`configuredTarget`) |
|
|
244
244
|
| `DecisionModel.layerFor(target, cacheDirectory?)` | The same for a model given in code: `workersAiTarget({ accountId, token, model? })` or `endpointTarget({ url, model, token? })` |
|
|
245
|
+
| `DecisionModel.cascadeLayer(primary, secondary, cacheDirectory?, options?)` | Cross-family cascade: asks `primary` first and escalates only `[low, high]` probabilities to `secondary`, combining both answers |
|
|
245
246
|
| `planRequests(state, questions, model?)` | The exact request bodies a model would be sent (default: Clef's) |
|
|
247
|
+
| `loadPolicies(directory)`, `parsePolicy(name, source)` | Policies from Markdown (`loadPolicies` needs `FileSystem` and `Path`, e.g. `BunServices.layer` from `@effect/platform-bun`) |
|
|
248
|
+
| `loadLabels(policy)`, `scorePolicy(policy, labels, cwd?)` | A policy scored against `.lint-anything/labels/<policy>.jsonl`: per labeled file and item, with reach (`labelFileItems`) |
|
|
249
|
+
| `quality`, `auroc`, `auprc`, `tprAtFpr`, `violationPrecision`, `pairedInterval`, `bootstrapInterval`, … | The metrics and 95% bootstrap intervals the evals and the score script report |
|
|
246
250
|
|
|
247
251
|
`Clef` and `ClefError` remain as deprecated names for `DecisionModel` and `DecisionModelError`.
|
|
248
|
-
| `loadPolicies(directory)`, `parsePolicy(name, source)` | Policies from Markdown (`loadPolicies` needs `FileSystem` and `Path`, e.g. `BunServices.layer` from `@effect/platform-bun`) |
|
|
249
|
-
| `loadLabels(policy)`, `scorePolicy(policy, labels, cwd?)` | A policy scored against `.lint-anything/labels/<policy>.jsonl`: per labeled file and item, with reach |
|
|
250
|
-
| `quality`, `auroc`, `pairedInterval`, `bootstrapInterval`, … | The metrics and 95% bootstrap intervals the evals and the score script report |
|
|
251
252
|
|
|
252
253
|
```ts
|
|
253
254
|
import { BunServices } from "@effect/platform-bun"
|