@neuroverseos/governance 0.2.2 → 0.2.3

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 (91) hide show
  1. package/.well-known/ai-plugin.json +26 -0
  2. package/.well-known/mcp.json +68 -0
  3. package/AGENTS.md +219 -0
  4. package/README.md +84 -4
  5. package/dist/adapters/autoresearch.cjs +196 -0
  6. package/dist/adapters/autoresearch.d.cts +103 -0
  7. package/dist/adapters/autoresearch.d.ts +103 -0
  8. package/dist/adapters/autoresearch.js +7 -0
  9. package/dist/adapters/deep-agents.cjs +1472 -0
  10. package/dist/adapters/deep-agents.d.cts +181 -0
  11. package/dist/adapters/deep-agents.d.ts +181 -0
  12. package/dist/adapters/deep-agents.js +17 -0
  13. package/dist/adapters/express.cjs +103 -21
  14. package/dist/adapters/express.d.cts +1 -1
  15. package/dist/adapters/express.d.ts +1 -1
  16. package/dist/adapters/express.js +3 -3
  17. package/dist/adapters/index.cjs +649 -109
  18. package/dist/adapters/index.d.cts +4 -1
  19. package/dist/adapters/index.d.ts +4 -1
  20. package/dist/adapters/index.js +39 -13
  21. package/dist/adapters/langchain.cjs +152 -48
  22. package/dist/adapters/langchain.d.cts +5 -5
  23. package/dist/adapters/langchain.d.ts +5 -5
  24. package/dist/adapters/langchain.js +4 -3
  25. package/dist/adapters/openai.cjs +154 -50
  26. package/dist/adapters/openai.d.cts +5 -5
  27. package/dist/adapters/openai.d.ts +5 -5
  28. package/dist/adapters/openai.js +4 -3
  29. package/dist/adapters/openclaw.cjs +152 -48
  30. package/dist/adapters/openclaw.d.cts +5 -5
  31. package/dist/adapters/openclaw.d.ts +5 -5
  32. package/dist/adapters/openclaw.js +4 -3
  33. package/dist/{build-P42YFKQV.js → build-X5MZY4IA.js} +2 -2
  34. package/dist/{chunk-2NICNKOM.js → chunk-4L6OPKMQ.js} +1 -1
  35. package/dist/chunk-5U2MQO5P.js +57 -0
  36. package/dist/{chunk-SKU3GAPD.js → chunk-6BB55YJI.js} +16 -34
  37. package/dist/{chunk-KEST3MWO.js → chunk-AF2VX4AL.js} +47 -8
  38. package/dist/chunk-BQZMOEML.js +43 -0
  39. package/dist/chunk-D2UCV5AK.js +326 -0
  40. package/dist/{chunk-RWXVAH6P.js → chunk-EVDJUSZ2.js} +16 -34
  41. package/dist/{chunk-4JRYGIO7.js → chunk-IZSO75NZ.js} +72 -7
  42. package/dist/chunk-JCKSW2PZ.js +304 -0
  43. package/dist/{chunk-PDOZHZWL.js → chunk-KTFTTLTP.js} +25 -4
  44. package/dist/{chunk-MWDQ4MJB.js → chunk-MH7BT4VH.js} +5 -1
  45. package/dist/{chunk-4QXB6PEO.js → chunk-QLPTHTVB.js} +37 -16
  46. package/dist/{chunk-QPASI2BR.js → chunk-REXY4LUL.js} +49 -10
  47. package/dist/chunk-T5EUJQE5.js +172 -0
  48. package/dist/{chunk-DPVS43ZT.js → chunk-TTBKTF3P.js} +5 -5
  49. package/dist/{chunk-OHAC6HJE.js → chunk-ZIVQNSZU.js} +16 -36
  50. package/dist/{chunk-BUWWN2NX.js → chunk-ZJTDUCC2.js} +9 -7
  51. package/dist/cli/neuroverse.cjs +2582 -493
  52. package/dist/cli/neuroverse.js +39 -15
  53. package/dist/cli/plan.cjs +119 -32
  54. package/dist/cli/plan.js +5 -13
  55. package/dist/cli/run.cjs +223 -24
  56. package/dist/cli/run.js +2 -2
  57. package/dist/decision-flow-LETV5NWY.js +61 -0
  58. package/dist/{derive-TLIV4OOU.js → derive-7365SUFU.js} +2 -2
  59. package/dist/{doctor-QV6HELS5.js → doctor-QYISMKEL.js} +5 -2
  60. package/dist/equity-penalties-63FGB3I2.js +244 -0
  61. package/dist/{explain-IDCRWMPX.js → explain-A2EWI2OL.js} +4 -23
  62. package/dist/{guard-GFLQZY6U.js → guard-3BWL3IGH.js} +6 -10
  63. package/dist/{guard-contract-Cm91Kp4j.d.ts → guard-contract-C9_zKbzd.d.cts} +117 -5
  64. package/dist/{guard-contract-Cm91Kp4j.d.cts → guard-contract-C9_zKbzd.d.ts} +117 -5
  65. package/dist/{guard-engine-JLTUARGU.js → guard-engine-QFMIBWJY.js} +2 -2
  66. package/dist/{impact-XPECYRLH.js → impact-UB6DXKSX.js} +4 -4
  67. package/dist/{improve-GPUBKTEA.js → improve-XZA57GER.js} +5 -24
  68. package/dist/index.cjs +592 -44
  69. package/dist/index.d.cts +218 -5
  70. package/dist/index.d.ts +218 -5
  71. package/dist/index.js +92 -41
  72. package/dist/infer-world-7GVZWFX4.js +543 -0
  73. package/dist/init-world-VWMQZQC7.js +223 -0
  74. package/dist/{mcp-server-LZVJHBT5.js → mcp-server-XWQZXNW7.js} +3 -3
  75. package/dist/{playground-FGOMASHN.js → playground-ADWZORNV.js} +2 -2
  76. package/dist/{redteam-SK7AMIG3.js → redteam-JRQ7FD2F.js} +2 -2
  77. package/dist/{session-VISISNWJ.js → session-MMYX5YCF.js} +4 -3
  78. package/dist/shared--Q8wPBVN.d.ts +60 -0
  79. package/dist/shared-HpAG90PX.d.cts +60 -0
  80. package/dist/shared-U2QFV7JH.js +16 -0
  81. package/dist/{simulate-VDOYQFRO.js → simulate-GMIFFXYV.js} +5 -30
  82. package/dist/{test-75AVHC3R.js → test-JBBZ65X4.js} +2 -2
  83. package/dist/{trace-JVF67VR3.js → trace-3MYWIDEF.js} +3 -3
  84. package/dist/worlds/autoresearch.nv-world.md +230 -0
  85. package/dist/worlds/coding-agent.nv-world.md +211 -0
  86. package/llms.txt +79 -0
  87. package/openapi.yaml +230 -0
  88. package/package.json +26 -4
  89. package/dist/{chunk-GR6DGCZ2.js → chunk-BMOXICAB.js} +3 -3
  90. package/dist/{chunk-NF5POFCI.js → chunk-ORJ3NOE6.js} +3 -3
  91. package/dist/{world-LAXO6DOX.js → world-BFJCIQSH.js} +3 -3
package/openapi.yaml ADDED
@@ -0,0 +1,230 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: NeuroVerse Governance API
4
+ version: 0.2.2
5
+ description: |
6
+ Deterministic governance engine for AI agents.
7
+ Evaluates actions against world rules and plan constraints.
8
+ Returns ALLOW, BLOCK, or PAUSE verdicts. No LLM in the evaluation loop.
9
+ license:
10
+ name: Apache-2.0
11
+ url: https://www.apache.org/licenses/LICENSE-2.0
12
+ contact:
13
+ name: NeuroverseOS
14
+ url: https://neuroverseos.com
15
+
16
+ servers:
17
+ - url: http://localhost:4242
18
+ description: Local governance server (neuroverse playground or Express middleware)
19
+
20
+ paths:
21
+ /api/guard:
22
+ post:
23
+ operationId: evaluateGuard
24
+ summary: Evaluate an agent action against world governance rules
25
+ description: |
26
+ Synchronously evaluates whether an action is allowed by the loaded world.
27
+ Returns a verdict with status (ALLOW/BLOCK/PAUSE), matched rule, and optional trace.
28
+ requestBody:
29
+ required: true
30
+ content:
31
+ application/json:
32
+ schema:
33
+ $ref: '#/components/schemas/GuardEvent'
34
+ examples:
35
+ block_example:
36
+ summary: Action that gets blocked
37
+ value:
38
+ intent: "delete all customer tables"
39
+ tool: "database"
40
+ scope: "production"
41
+ allow_example:
42
+ summary: Action that is allowed
43
+ value:
44
+ intent: "read user profile"
45
+ tool: "database"
46
+ scope: "users"
47
+ responses:
48
+ '200':
49
+ description: Action is allowed
50
+ content:
51
+ application/json:
52
+ schema:
53
+ $ref: '#/components/schemas/GuardVerdict'
54
+ '403':
55
+ description: Action is blocked by governance policy
56
+ content:
57
+ application/json:
58
+ schema:
59
+ $ref: '#/components/schemas/BlockResponse'
60
+
61
+ /api/plan/check:
62
+ post:
63
+ operationId: checkPlan
64
+ summary: Check an action against the active plan
65
+ description: |
66
+ Evaluates whether an action matches a step in the active plan.
67
+ Returns ON_PLAN, OFF_PLAN, CONSTRAINT_VIOLATED, or PLAN_COMPLETE.
68
+ requestBody:
69
+ required: true
70
+ content:
71
+ application/json:
72
+ schema:
73
+ $ref: '#/components/schemas/GuardEvent'
74
+ responses:
75
+ '200':
76
+ description: Plan verdict
77
+ content:
78
+ application/json:
79
+ schema:
80
+ $ref: '#/components/schemas/PlanVerdict'
81
+
82
+ /api/plan/advance:
83
+ post:
84
+ operationId: advancePlan
85
+ summary: Mark a plan step as completed
86
+ description: |
87
+ Advances a step in the active plan. In verified mode, steps with
88
+ a `verify` field require evidence (type + proof) to advance.
89
+ requestBody:
90
+ required: true
91
+ content:
92
+ application/json:
93
+ schema:
94
+ type: object
95
+ required:
96
+ - stepId
97
+ properties:
98
+ stepId:
99
+ type: string
100
+ description: ID of the step to advance
101
+ evidence:
102
+ $ref: '#/components/schemas/StepEvidence'
103
+ responses:
104
+ '200':
105
+ description: Step advanced successfully
106
+ content:
107
+ application/json:
108
+ schema:
109
+ $ref: '#/components/schemas/AdvanceResult'
110
+
111
+ /api/plan/status:
112
+ get:
113
+ operationId: getPlanStatus
114
+ summary: Get current plan progress
115
+ responses:
116
+ '200':
117
+ description: Plan progress
118
+ content:
119
+ application/json:
120
+ schema:
121
+ $ref: '#/components/schemas/PlanProgress'
122
+
123
+ components:
124
+ schemas:
125
+ GuardEvent:
126
+ type: object
127
+ required:
128
+ - intent
129
+ properties:
130
+ intent:
131
+ type: string
132
+ description: What the agent wants to do
133
+ tool:
134
+ type: string
135
+ description: Tool being invoked (e.g., "database", "http", "shell")
136
+ scope:
137
+ type: string
138
+ description: Resource or scope being accessed
139
+ actionCategory:
140
+ type: string
141
+ enum: [read, write, delete, execute, communicate, other]
142
+ direction:
143
+ type: string
144
+ enum: [input, output]
145
+ args:
146
+ type: object
147
+ additionalProperties: true
148
+
149
+ GuardVerdict:
150
+ type: object
151
+ properties:
152
+ status:
153
+ type: string
154
+ enum: [ALLOW, BLOCK, PAUSE]
155
+ reason:
156
+ type: string
157
+ ruleId:
158
+ type: string
159
+ invariantId:
160
+ type: string
161
+ trace:
162
+ type: object
163
+ description: Full evaluation trace (when trace mode is enabled)
164
+
165
+ BlockResponse:
166
+ type: object
167
+ properties:
168
+ error:
169
+ type: string
170
+ example: Governance policy violation
171
+ reason:
172
+ type: string
173
+ ruleId:
174
+ type: string
175
+ status:
176
+ type: string
177
+ enum: [BLOCK, PAUSE]
178
+
179
+ PlanVerdict:
180
+ type: object
181
+ properties:
182
+ allowed:
183
+ type: boolean
184
+ status:
185
+ type: string
186
+ enum: [ON_PLAN, OFF_PLAN, CONSTRAINT_VIOLATED, PLAN_COMPLETE]
187
+ matchedStep:
188
+ type: string
189
+ closestStep:
190
+ type: string
191
+ reason:
192
+ type: string
193
+ progress:
194
+ $ref: '#/components/schemas/PlanProgress'
195
+
196
+ PlanProgress:
197
+ type: object
198
+ properties:
199
+ completed:
200
+ type: integer
201
+ total:
202
+ type: integer
203
+ percentage:
204
+ type: integer
205
+
206
+ StepEvidence:
207
+ type: object
208
+ required:
209
+ - type
210
+ - proof
211
+ properties:
212
+ type:
213
+ type: string
214
+ description: Must match the step's `verify` field
215
+ proof:
216
+ type: string
217
+ description: URL, hash, output snippet, or other proof
218
+ timestamp:
219
+ type: string
220
+ format: date-time
221
+
222
+ AdvanceResult:
223
+ type: object
224
+ properties:
225
+ success:
226
+ type: boolean
227
+ reason:
228
+ type: string
229
+ evidence:
230
+ $ref: '#/components/schemas/StepEvidence'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuroverseos/governance",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Deterministic governance engine for AI agents — enforce worlds (permanent rules) and plans (mission constraints) with full audit trace",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -38,6 +38,16 @@
38
38
  "import": "./dist/adapters/express.js",
39
39
  "require": "./dist/adapters/express.cjs"
40
40
  },
41
+ "./adapters/autoresearch": {
42
+ "types": "./dist/adapters/autoresearch.d.ts",
43
+ "import": "./dist/adapters/autoresearch.js",
44
+ "require": "./dist/adapters/autoresearch.cjs"
45
+ },
46
+ "./adapters/deep-agents": {
47
+ "types": "./dist/adapters/deep-agents.d.ts",
48
+ "import": "./dist/adapters/deep-agents.js",
49
+ "require": "./dist/adapters/deep-agents.cjs"
50
+ },
41
51
  "./plan": {
42
52
  "types": "./dist/index.d.ts",
43
53
  "import": "./dist/index.js",
@@ -51,10 +61,14 @@
51
61
  "dist",
52
62
  "dist/worlds",
53
63
  "LICENSE.md",
54
- "README.md"
64
+ "README.md",
65
+ "AGENTS.md",
66
+ "llms.txt",
67
+ "openapi.yaml",
68
+ ".well-known"
55
69
  ],
56
70
  "scripts": {
57
- "build": "tsup src/index.ts src/cli/neuroverse.ts src/cli/plan.ts src/cli/run.ts src/adapters/index.ts src/adapters/langchain.ts src/adapters/openai.ts src/adapters/openclaw.ts src/adapters/express.ts --format esm,cjs --dts --clean && cp src/worlds/derivation-world.nv-world.md dist/worlds/derivation-world.nv-world.md",
71
+ "build": "tsup src/index.ts src/cli/neuroverse.ts src/cli/plan.ts src/cli/run.ts src/adapters/index.ts src/adapters/langchain.ts src/adapters/openai.ts src/adapters/openclaw.ts src/adapters/express.ts src/adapters/autoresearch.ts src/adapters/deep-agents.ts --format esm,cjs --dts --clean && cp src/worlds/derivation-world.nv-world.md dist/worlds/derivation-world.nv-world.md && cp src/worlds/autoresearch.nv-world.md dist/worlds/autoresearch.nv-world.md && cp src/worlds/coding-agent.nv-world.md dist/worlds/coding-agent.nv-world.md",
58
72
  "prebuild": "mkdir -p dist/worlds",
59
73
  "dev": "tsup src/index.ts src/cli/neuroverse.ts --format esm,cjs --dts --watch",
60
74
  "test": "vitest run",
@@ -82,10 +96,18 @@
82
96
  "ai-safety",
83
97
  "openclaw-plugin",
84
98
  "langchain-plugin",
99
+ "deep-agents",
100
+ "coding-agent-governance",
85
101
  "drift-prevention",
86
102
  "mcp",
87
103
  "mcp-server",
88
- "model-context-protocol"
104
+ "model-context-protocol",
105
+ "autoresearch",
106
+ "research-agents",
107
+ "deep-agents",
108
+ "coding-agents",
109
+ "ai-firewall",
110
+ "agent-guardrails"
89
111
  ],
90
112
  "repository": {
91
113
  "type": "git",
@@ -1,9 +1,9 @@
1
- import {
2
- simulateWorld
3
- } from "./chunk-FYS2CBUW.js";
4
1
  import {
5
2
  validateWorld
6
3
  } from "./chunk-7P3S7MAY.js";
4
+ import {
5
+ simulateWorld
6
+ } from "./chunk-FYS2CBUW.js";
7
7
 
8
8
  // src/engine/improve-engine.ts
9
9
  function improveWorld(world) {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createProvider
3
3
  } from "./chunk-Q6O7ZLO2.js";
4
- import {
5
- loadConfig
6
- } from "./chunk-OT6PXH54.js";
7
4
  import {
8
5
  emitWorldDefinition,
9
6
  parseWorldMarkdown
10
7
  } from "./chunk-XPDMYECO.js";
8
+ import {
9
+ loadConfig
10
+ } from "./chunk-OT6PXH54.js";
11
11
  import {
12
12
  validateWorld
13
13
  } from "./chunk-7P3S7MAY.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ validateWorld
3
+ } from "./chunk-7P3S7MAY.js";
1
4
  import {
2
5
  describeActiveWorld,
3
6
  getActiveWorldName,
@@ -5,9 +8,6 @@ import {
5
8
  resolveWorldPath,
6
9
  setActiveWorld
7
10
  } from "./chunk-AKW5YVCE.js";
8
- import {
9
- validateWorld
10
- } from "./chunk-7P3S7MAY.js";
11
11
  import {
12
12
  loadWorld
13
13
  } from "./chunk-JZPQGIKR.js";