pi-harness-runtime 1.1.402 → 1.1.403

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/packages/a2a-adapter/package.json +1 -1
  4. package/packages/agent-policy/package.json +1 -1
  5. package/packages/architecture-generator/package.json +1 -1
  6. package/packages/auth/package.json +1 -1
  7. package/packages/autonomous-refactor/package.json +1 -1
  8. package/packages/autonomous-runtime/package.json +1 -1
  9. package/packages/cache-strategy/package.json +1 -1
  10. package/packages/capability-registry/package.json +1 -1
  11. package/packages/checkpoint/package.json +1 -1
  12. package/packages/cli-plugin-sdk/package.json +1 -1
  13. package/packages/clipboard/package.json +1 -1
  14. package/packages/clipboard-plugin/package.json +1 -1
  15. package/packages/code-generation/package.json +1 -1
  16. package/packages/code-review/package.json +1 -1
  17. package/packages/codex-adapter/package.json +1 -1
  18. package/packages/codex-watcher/package.json +1 -1
  19. package/packages/config-capture/package.json +1 -1
  20. package/packages/connection-runtime/package.json +1 -1
  21. package/packages/context-compiler/package.json +1 -1
  22. package/packages/context-discovery/package.json +1 -1
  23. package/packages/context-manager/package.json +1 -1
  24. package/packages/contracts/package.json +1 -1
  25. package/packages/cookie-sanitizer/package.json +1 -1
  26. package/packages/cost-optimizer/package.json +1 -1
  27. package/packages/dependency-analyzer/package.json +1 -1
  28. package/packages/django-plugin/package.json +1 -1
  29. package/packages/doc-generator/package.json +1 -1
  30. package/packages/durable-review/package.json +1 -1
  31. package/packages/e2e-tester/package.json +1 -1
  32. package/packages/evaluation-engine/package.json +1 -1
  33. package/packages/evaluation-runner/package.json +1 -1
  34. package/packages/event-bus/package.json +1 -1
  35. package/packages/event-sink/package.json +1 -1
  36. package/packages/event-store/package.json +1 -1
  37. package/packages/experience-replay/package.json +1 -1
  38. package/packages/feedback-collector/package.json +1 -1
  39. package/packages/file-copy-helper/package.json +1 -1
  40. package/packages/framework-detector/package.json +1 -1
  41. package/packages/framework-plugin-sdk/package.json +1 -1
  42. package/packages/frappe-plugin/package.json +1 -1
  43. package/packages/generic-web-plugin/package.json +1 -1
  44. package/packages/health-monitor/package.json +1 -1
  45. package/packages/intent-analyzer/package.json +1 -1
  46. package/packages/jev-judge/dist/question-risk.d.ts +8 -5
  47. package/packages/jev-judge/dist/question-risk.d.ts.map +1 -1
  48. package/packages/jev-judge/dist/question-risk.js +12 -7
  49. package/packages/jev-judge/dist/question-risk.js.map +1 -1
  50. package/packages/jev-judge/package.json +1 -1
  51. package/packages/jev-judge/src/question-risk.ts +12 -8
  52. package/packages/jev-judge/tests/auto-continue-context.test.ts +22 -0
  53. package/packages/jev-judge/tests/question-risk.test.ts +15 -2
  54. package/packages/knowledge-graph/package.json +1 -1
  55. package/packages/knowledge-retrieval/package.json +1 -1
  56. package/packages/laravel-plugin/package.json +1 -1
  57. package/packages/learning-engine/package.json +1 -1
  58. package/packages/logging/package.json +1 -1
  59. package/packages/mcp-adapter/package.json +1 -1
  60. package/packages/memory-engine/package.json +1 -1
  61. package/packages/milestone-manager/package.json +1 -1
  62. package/packages/model-registry/package.json +1 -1
  63. package/packages/nextjs-plugin/package.json +1 -1
  64. package/packages/notification/package.json +1 -1
  65. package/packages/observability/package.json +1 -1
  66. package/packages/okf-indexer/package.json +1 -1
  67. package/packages/paperclip-integration/package.json +1 -1
  68. package/packages/performance-optimizer/package.json +1 -1
  69. package/packages/permission-mode/package.json +1 -1
  70. package/packages/privilege-broker/package.json +1 -1
  71. package/packages/project-analyzer/package.json +1 -1
  72. package/packages/project-bootstrap/package.json +1 -1
  73. package/packages/projection-engine/package.json +1 -1
  74. package/packages/prompt-compiler/package.json +1 -1
  75. package/packages/prompt-versioning/package.json +1 -1
  76. package/packages/provider-adapter-sdk/package.json +1 -1
  77. package/packages/provider-router/package.json +1 -1
  78. package/packages/provider-selector/package.json +1 -1
  79. package/packages/providers/package.json +1 -1
  80. package/packages/qdrant-skills/package.json +1 -1
  81. package/packages/quota-manager/package.json +1 -1
  82. package/packages/rate-limiter/package.json +1 -1
  83. package/packages/react-vite-plugin/package.json +1 -1
  84. package/packages/relay/package.json +1 -1
  85. package/packages/release-manager/package.json +1 -1
  86. package/packages/requirement-compiler/package.json +1 -1
  87. package/packages/runtime/package.json +1 -1
  88. package/packages/scheduler/package.json +1 -1
  89. package/packages/scheduler-adapter/package.json +1 -1
  90. package/packages/session/package.json +1 -1
  91. package/packages/session-api/package.json +1 -1
  92. package/packages/session-export/package.json +1 -1
  93. package/packages/shared-context/package.json +1 -1
  94. package/packages/skill-mcp-client/package.json +1 -1
  95. package/packages/skill-registry/package.json +1 -1
  96. package/packages/skills/package.json +1 -1
  97. package/packages/sprint-planner/package.json +1 -1
  98. package/packages/subscription-engine/package.json +1 -1
  99. package/packages/task-compiler/package.json +1 -1
  100. package/packages/telegram/package.json +1 -1
  101. package/packages/tencentdb-memory/package.json +1 -1
  102. package/packages/tencentdb-sync/package.json +1 -1
  103. package/packages/test-data-generator/package.json +1 -1
  104. package/packages/test-generator/package.json +1 -1
  105. package/packages/todo-bd-sync/package.json +1 -1
  106. package/packages/token-estimation/package.json +1 -1
  107. package/packages/token-optimizer/package.json +1 -1
  108. package/packages/trajectory/package.json +1 -1
  109. package/packages/tui/package.json +1 -1
  110. package/packages/types/package.json +1 -1
  111. package/packages/voice-api/package.json +1 -1
  112. package/packages/webmcp-tester/package.json +1 -1
  113. package/packages/wiki/package.json +1 -1
  114. package/packages/workflow-events/package.json +1 -1
  115. package/packages/workspace-scanner/package.json +1 -1
  116. package/packages/worktree/package.json +1 -1
  117. package/packages/write-review/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.189](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.402...v1.1.189) (2026-10-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **jev:** keep routine approval questions auto-approvable ([31fb075](https://github.com/ManotLuijiu/pi-harness-runtime/commit/31fb075db4363791f6c9b6094d90ce2acbeff9c1))
11
+
5
12
  ### [1.1.188](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.401...v1.1.188) (2026-10-24)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-harness-runtime",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/a2a-adapter",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Google Agent-to-Agent (A2A) protocol adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/agent-policy",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Agent policy runtime for pi-harness - enforces mandatory rule delivery and mutation gating",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/architecture-generator",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Generate ADR and Mermaid diagrams from project analysis",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/auth",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "pi-harness-runtime — auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-refactor",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Autonomous refactoring engine",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/autonomous-runtime",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/cache-strategy",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Smart caching with TTL and invalidation strategies (RFC-0022)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/capability-registry",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Capability Registry for pi-harness-runtime — tracks model capabilities and enables capability-based routing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/checkpoint",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Enhanced checkpoint system with incremental snapshots, diff-based storage, and recovery strategies",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/cli-plugin-sdk",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "CLI Plugin SDK for pi-harness — install, list, remove, update, invoke plugins",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/clipboard-plugin",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-generation",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Code generation pipeline for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/code-review",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Automated code review engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/codex-adapter",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "OpenAI Codex provider adapter for pi-harness",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/codex-watcher",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Watches Codex CLI sessions and emits visible messages for PING-PONG monitoring",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/config-capture",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Auto-capture API-fetched configuration values to AGENTS.md",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/connection-runtime",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Connection management with jittered exponential backoff for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-compiler",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Bounded context selection engine for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/context-discovery",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/context-manager",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Context Window Manager — prevents model context overflow via compaction and resume prompts (RFC-0010)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/contracts",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "RPC schema definitions for pi-harness runtime",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cookie-sanitizer",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "pi-harness-runtime — cookie sanitizer (provider-quota cookie file normaliser)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/cost-optimizer",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Cost Optimizer for pi-harness-runtime — budget tracking, forecasting, and model selection optimization",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/dependency-analyzer",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/django-plugin",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Django framework analysis — models, management commands, settings",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/doc-generator",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Auto-Doc Generator — generate documentation from source code (RFC-0014)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/durable-review",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "SQLite-backed durable reviewer using @earendil-works/pi-durable",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/e2e-tester",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "WebMCP-powered E2E testing for pi-harness - natural language test scenarios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/evaluation-engine",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Evaluation engine for pi-harness runtime (RFC-0057)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/evaluation-runner",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Framework-agnostic evaluation framework for AI outputs (RFC-0020)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-bus",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/event-sink",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Atomic event sourcing with SQLite transactions for pi-harness",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/event-store",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/experience-replay",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Experience replay for debugging and reproducibility (RFC-0059)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/feedback-collector",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Collect and aggregate human/automated feedback (RFC-0021)",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moocoding/file-copy-helper",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Injects cp/sudo cp rule when user asks to mimic/copy files",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-detector",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Framework detection system for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/framework-plugin-sdk",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Framework plugin SDK for pi-harness-runtime",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/frappe-plugin",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Frappe/ERPNext framework analysis — DocTypes, hooks, bench sites, site config",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/generic-web-plugin",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Generic web framework analysis — REST/GraphQL endpoints, OpenAPI, auth",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/health-monitor",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "description": "Health monitoring and auto-healing",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi/intent-analyzer",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -36,15 +36,18 @@ export interface QuestionRiskInput {
36
36
  *
37
37
  * The rules:
38
38
  *
39
- * - A question that asks for permission for a concrete action ("approval",
40
- * "explicit") needs the explicit authorization of a human. Jev never
41
- * approves it on its own.
39
+ * - A question of kind "explicit" asks for an explicit human authorization.
40
+ * Jev never approves it on its own.
41
+ * - A question of kind "approval" is the agent proposing work. It stays
42
+ * auto-approvable as long as nothing in it is risky - that is the whole
43
+ * point of the timeout: routine, reversible work continues when the user
44
+ * is away.
42
45
  * - A question that names a destructive action is destructive, and its
43
46
  * reversibility cannot be proven - so it waits.
47
+ * - A question that reaches the outside world or touches a secret needs a
48
+ * human as well.
44
49
  * - A question with an unknown kind or an empty text is uncertain, and an
45
50
  * uncertain case waits for the human.
46
- * - Only a routine question without a destructive or external signal is
47
- * harmless enough for an autonomous decision.
48
51
  */
49
52
  export declare function classifyQuestionRisk(input: QuestionRiskInput): QuestionRiskFacts;
50
53
  //# sourceMappingURL=question-risk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"question-risk.d.ts","sourceRoot":"","sources":["../src/question-risk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,6BAA6B,EAAE,OAAO,CAAC;IACvC,kDAAkD;IAClD,WAAW,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAuDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,iBAAiB,GACtB,iBAAiB,CAsCnB"}
1
+ {"version":3,"file":"question-risk.d.ts","sourceRoot":"","sources":["../src/question-risk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,UAAU,GACV,eAAe,GACf,UAAU,GACV,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,6BAA6B,EAAE,OAAO,CAAC;IACvC,kDAAkD;IAClD,WAAW,EAAE,OAAO,CAAC;IACrB,gCAAgC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAuDD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,iBAAiB,GACtB,iBAAiB,CAuCnB"}
@@ -55,15 +55,18 @@ function matchPatterns(text, patterns, signals) {
55
55
  *
56
56
  * The rules:
57
57
  *
58
- * - A question that asks for permission for a concrete action ("approval",
59
- * "explicit") needs the explicit authorization of a human. Jev never
60
- * approves it on its own.
58
+ * - A question of kind "explicit" asks for an explicit human authorization.
59
+ * Jev never approves it on its own.
60
+ * - A question of kind "approval" is the agent proposing work. It stays
61
+ * auto-approvable as long as nothing in it is risky - that is the whole
62
+ * point of the timeout: routine, reversible work continues when the user
63
+ * is away.
61
64
  * - A question that names a destructive action is destructive, and its
62
65
  * reversibility cannot be proven - so it waits.
66
+ * - A question that reaches the outside world or touches a secret needs a
67
+ * human as well.
63
68
  * - A question with an unknown kind or an empty text is uncertain, and an
64
69
  * uncertain case waits for the human.
65
- * - Only a routine question without a destructive or external signal is
66
- * harmless enough for an autonomous decision.
67
70
  */
68
71
  export function classifyQuestionRisk(input) {
69
72
  const text = (input.text ?? "").toLowerCase();
@@ -72,8 +75,10 @@ export function classifyQuestionRisk(input) {
72
75
  const destructive = matchPatterns(text, DESTRUCTIVE_PATTERNS, signals);
73
76
  const external = matchPatterns(text, EXTERNAL_PATTERNS, signals);
74
77
  const sensitive = matchPatterns(text, SENSITIVE_PATTERNS, signals);
75
- // The agent asked for permission for a concrete action.
76
- let requiresExplicitAuthorization = kind === "approval" || kind === "explicit";
78
+ // Only an explicitly demanded authorization blocks the autonomous
79
+ // decision. An "approval" question is the agent proposing work: it
80
+ // stays auto-approvable unless the wording names a risky action.
81
+ let requiresExplicitAuthorization = kind === "explicit";
77
82
  // A destructive action never gets an autonomous approval.
78
83
  if (destructive) {
79
84
  requiresExplicitAuthorization = true;
@@ -1 +1 @@
1
- {"version":3,"file":"question-risk.js","sourceRoot":"","sources":["../src/question-risk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAoCH;;GAEG;AACH,MAAM,oBAAoB,GAAkB;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,4DAA4D,EAAE;IACzF,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,6BAA6B,EAAE;IACzD,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,gCAAgC,EAAE;IAC7D,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,0EAA0E,EAAE;IAC3G,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,4DAA4D,EAAE;IAC9F,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,uFAAuF,EAAE;IAC3H,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,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AC;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAEnE,kEAAkE;IAClE,mEAAmE;IACnE,iEAAiE;IACjE,IAAI,6BAA6B,GAAG,IAAI,KAAK,UAAU,CAAC;IAExD,0DAA0D;IAC1D,IAAI,WAAW,EAAE,CAAC;QACjB,6BAA6B,GAAG,IAAI,CAAC;IACtC,CAAC;IAED,uEAAuE;IACvE,iBAAiB;IACjB,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;QAC3B,6BAA6B,GAAG,IAAI,CAAC;IACtC,CAAC;IAED,6DAA6D;IAC7D,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3B,6BAA6B,GAAG,IAAI,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAED,OAAO;QACN,6BAA6B;QAC7B,WAAW;QACX,mDAAmD;QACnD,UAAU,EAAE,CAAC,WAAW;QACxB,QAAQ;QACR,OAAO;KACP,CAAC;AACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-harness/jev-judge",
3
- "version": "1.1.402",
3
+ "version": "1.1.403",
4
4
  "description": "Jev Judge - Structured decision model for agent routing, E2E testing, and automated decisions",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -98,15 +98,18 @@ function matchPatterns(
98
98
  *
99
99
  * The rules:
100
100
  *
101
- * - A question that asks for permission for a concrete action ("approval",
102
- * "explicit") needs the explicit authorization of a human. Jev never
103
- * approves it on its own.
101
+ * - A question of kind "explicit" asks for an explicit human authorization.
102
+ * Jev never approves it on its own.
103
+ * - A question of kind "approval" is the agent proposing work. It stays
104
+ * auto-approvable as long as nothing in it is risky - that is the whole
105
+ * point of the timeout: routine, reversible work continues when the user
106
+ * is away.
104
107
  * - A question that names a destructive action is destructive, and its
105
108
  * reversibility cannot be proven - so it waits.
109
+ * - A question that reaches the outside world or touches a secret needs a
110
+ * human as well.
106
111
  * - A question with an unknown kind or an empty text is uncertain, and an
107
112
  * uncertain case waits for the human.
108
- * - Only a routine question without a destructive or external signal is
109
- * harmless enough for an autonomous decision.
110
113
  */
111
114
  export function classifyQuestionRisk(
112
115
  input: QuestionRiskInput,
@@ -119,9 +122,10 @@ export function classifyQuestionRisk(
119
122
  const external = matchPatterns(text, EXTERNAL_PATTERNS, signals);
120
123
  const sensitive = matchPatterns(text, SENSITIVE_PATTERNS, signals);
121
124
 
122
- // The agent asked for permission for a concrete action.
123
- let requiresExplicitAuthorization =
124
- kind === "approval" || kind === "explicit";
125
+ // Only an explicitly demanded authorization blocks the autonomous
126
+ // decision. An "approval" question is the agent proposing work: it
127
+ // stays auto-approvable unless the wording names a risky action.
128
+ let requiresExplicitAuthorization = kind === "explicit";
125
129
 
126
130
  // A destructive action never gets an autonomous approval.
127
131
  if (destructive) {
@@ -138,6 +138,28 @@ describe("decision policy", () => {
138
138
  expect(result.appliedRule).toBe("clarification-never-approved");
139
139
  });
140
140
 
141
+ it("approves a benign approval question so the timeout can work", () => {
142
+ // The timeout exists for routine, reversible work: an agent that
143
+ // proposes work is not a hard authorization block.
144
+ const result = applyDecisionPolicy(
145
+ "approve",
146
+ context({
147
+ question: {
148
+ requestId: "q-1",
149
+ text: "Want me to implement the toggle buttons now?",
150
+ kind: "approval",
151
+ requiresExplicitAuthorization: false,
152
+ destructive: false,
153
+ reversible: true,
154
+ },
155
+ }),
156
+ { confidence: 0.9 },
157
+ );
158
+
159
+ expect(result.outcome).toBe("approve");
160
+ expect(result.appliedRule).toBeUndefined();
161
+ });
162
+
141
163
  it("never approves an action that needs an explicit authorization", () => {
142
164
  const result = applyDecisionPolicy(
143
165
  "approve",
@@ -25,14 +25,17 @@ describe("classifyQuestionRisk", () => {
25
25
  });
26
26
 
27
27
  describe("a question that asks for permission", () => {
28
- it("needs an explicit authorization for an approval question", () => {
28
+ it("keeps a benign approval question auto-approvable", () => {
29
29
  const risk = classifyQuestionRisk({
30
30
  kind: "approval",
31
31
  text: "Want me to implement the toggle buttons now?",
32
32
  });
33
33
 
34
- expect(risk.requiresExplicitAuthorization).toBe(true);
34
+ // The timeout exists for routine, reversible work: the agent
35
+ // proposing work is not a hard authorization block.
36
+ expect(risk.requiresExplicitAuthorization).toBe(false);
35
37
  expect(risk.destructive).toBe(false);
38
+ expect(risk.reversible).toBe(true);
36
39
  });
37
40
 
38
41
  it("needs an explicit authorization for an explicit question", () => {
@@ -43,6 +46,16 @@ describe("classifyQuestionRisk", () => {
43
46
 
44
47
  expect(risk.requiresExplicitAuthorization).toBe(true);
45
48
  });
49
+
50
+ it("needs an explicit authorization for a risky approval question", () => {
51
+ const risk = classifyQuestionRisk({
52
+ kind: "approval",
53
+ text: "Want me to remove the old config file now?",
54
+ });
55
+
56
+ expect(risk.requiresExplicitAuthorization).toBe(true);
57
+ expect(risk.destructive).toBe(true);
58
+ });
46
59
  });
47
60
 
48
61
  describe("a destructive action", () => {