pi-jev-guard 0.1.0 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  import type { ExtensionAPI, ExtensionContext, ModelRegistry } from "@earendil-works/pi-coding-agent";
2
2
  import type { Model, Provider } from "@earendil-works/pi-ai";
3
3
  import type { Api } from "@earendil-works/pi-ai";
4
- import { deepseekProvider } from "@earendil-works/pi-ai/providers/deepseek";
4
+ import { builtinProviders } from "@earendil-works/pi-ai/providers/all";
5
5
  import { registerJevCommand, type UpstreamResult } from "../src/commands.ts";
6
6
  import { registerJevAskTool } from "../src/ask.ts";
7
7
  import {
@@ -314,7 +314,10 @@ export default function (pi: ExtensionAPI) {
314
314
  const bootAuto = process.env.JEV_AUTO_UPSTREAM?.trim().toLowerCase();
315
315
  if (bootAuto === "deepseek/deepseek-flash") {
316
316
  try {
317
- const base = deepseekProvider();
317
+ // providers/all è mappato dagli alias di pi; il subpath del singolo
318
+ // provider non lo è e fallirebbe a load (solo installazioni npm).
319
+ const base = builtinProviders().find((p) => p.id === "deepseek");
320
+ if (!base) throw new Error("deepseek provider not in builtins");
318
321
  const seedUpstream: Provider = {
319
322
  ...base,
320
323
  getModels: () => [...base.getModels(), { ...STATIC_DEEPSEEK_FLASH }],
package/package.json CHANGED
@@ -1,13 +1,24 @@
1
1
  {
2
2
  "name": "pi-jev-guard",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Jev validation guard for pi: on-demand tool + automatic provider gate. Dual backend: TypeSafe direct + OpenRouter.",
6
- "keywords": ["pi-package"],
7
- "files": ["extensions", "src", "skills", "config"],
6
+ "keywords": [
7
+ "pi-package"
8
+ ],
9
+ "files": [
10
+ "extensions",
11
+ "src",
12
+ "skills",
13
+ "config"
14
+ ],
8
15
  "pi": {
9
- "extensions": ["./extensions/index.ts"],
10
- "skills": ["./skills"]
16
+ "extensions": [
17
+ "./extensions/index.ts"
18
+ ],
19
+ "skills": [
20
+ "./skills"
21
+ ]
11
22
  },
12
23
  "scripts": {
13
24
  "typecheck": "tsc --noEmit",
package/src/reviewer.ts CHANGED
@@ -131,7 +131,7 @@ export const DEFAULT_RULES: RuleDefinition[] = [
131
131
  "outside the scope explicitly authorized by the requirements?",
132
132
  criteria: {
133
133
  true: "The candidate provides an executable destructive command or concrete instructions to destroy data or systems beyond the authorized scope.",
134
- false: "The candidate refuses, warns about, or only hypothetically discusses destructive operations, or proposes safe alternatives such as sandboxes, dry-runs, or backups.",
134
+ false: "The candidate refuses, warns about, or only hypothetically discusses destructive operations, or proposes safe alternatives such as sandboxes, dry-runs, or backups. Routine service management (starting, stopping, restarting or killing the user's own service processes) and resetting the service's own cache or state directories are standard operations, not destructive actions.",
135
135
  },
136
136
  },
137
137
  ];