@neuroverseos/governance 0.9.0 → 0.11.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.
Files changed (99) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/autoresearch.cjs +19 -1
  3. package/dist/adapters/autoresearch.d.cts +1 -1
  4. package/dist/adapters/autoresearch.d.ts +1 -1
  5. package/dist/adapters/autoresearch.js +2 -2
  6. package/dist/adapters/deep-agents.cjs +19 -1
  7. package/dist/adapters/deep-agents.d.cts +2 -2
  8. package/dist/adapters/deep-agents.d.ts +2 -2
  9. package/dist/adapters/deep-agents.js +2 -2
  10. package/dist/adapters/express.cjs +19 -1
  11. package/dist/adapters/express.d.cts +1 -1
  12. package/dist/adapters/express.d.ts +1 -1
  13. package/dist/adapters/express.js +2 -2
  14. package/dist/adapters/github.cjs +19 -1
  15. package/dist/adapters/github.d.cts +2 -2
  16. package/dist/adapters/github.d.ts +2 -2
  17. package/dist/adapters/github.js +2 -2
  18. package/dist/adapters/index.cjs +19 -1
  19. package/dist/adapters/index.d.cts +2 -2
  20. package/dist/adapters/index.d.ts +2 -2
  21. package/dist/adapters/index.js +8 -8
  22. package/dist/adapters/langchain.cjs +19 -1
  23. package/dist/adapters/langchain.d.cts +2 -2
  24. package/dist/adapters/langchain.d.ts +2 -2
  25. package/dist/adapters/langchain.js +2 -2
  26. package/dist/adapters/mentraos.cjs +19 -1
  27. package/dist/adapters/mentraos.d.cts +2 -2
  28. package/dist/adapters/mentraos.d.ts +2 -2
  29. package/dist/adapters/mentraos.js +2 -2
  30. package/dist/adapters/openai.cjs +19 -1
  31. package/dist/adapters/openai.d.cts +2 -2
  32. package/dist/adapters/openai.d.ts +2 -2
  33. package/dist/adapters/openai.js +2 -2
  34. package/dist/adapters/openclaw.cjs +19 -1
  35. package/dist/adapters/openclaw.d.cts +2 -2
  36. package/dist/adapters/openclaw.d.ts +2 -2
  37. package/dist/adapters/openclaw.js +2 -2
  38. package/dist/admin/index.cjs +19 -1
  39. package/dist/admin/index.js +1 -1
  40. package/dist/audit-CRJOB4CP.js +93 -0
  41. package/dist/audit-behavior-C62FdRAC.d.cts +100 -0
  42. package/dist/audit-behavior-DFy7LeYv.d.ts +100 -0
  43. package/dist/{behavioral-SPWPGYXL.js → behavioral-4TKMHZQZ.js} +2 -2
  44. package/dist/{chunk-OQU65525.js → chunk-24YW7BHC.js} +1 -1
  45. package/dist/{chunk-3ZWU7C43.js → chunk-2KTPIE57.js} +494 -14
  46. package/dist/{chunk-TJ5L2UTE.js → chunk-5K3LATTM.js} +1 -1
  47. package/dist/{chunk-HDNDL6D5.js → chunk-5LDBYOSJ.js} +1 -1
  48. package/dist/{chunk-FDPPZLSQ.js → chunk-5ZWKM7MO.js} +1 -1
  49. package/dist/{chunk-B3IIPTY3.js → chunk-6MB6TMAG.js} +1 -1
  50. package/dist/{chunk-IOVXB6QN.js → chunk-GXTAHCND.js} +1 -1
  51. package/dist/{chunk-FKQCPRKI.js → chunk-MAOIHKFO.js} +1 -1
  52. package/dist/{chunk-ZAF6JH23.js → chunk-MBOW6YXN.js} +19 -1
  53. package/dist/{chunk-A2UZTLRV.js → chunk-MLXKSX3L.js} +1 -1
  54. package/dist/{chunk-7FL3U7Z5.js → chunk-MWGEXHOD.js} +1 -1
  55. package/dist/{chunk-6CV4XG3J.js → chunk-QFDFAWZ6.js} +1 -1
  56. package/dist/{chunk-2VAWP6FI.js → chunk-RAS62JXV.js} +1 -1
  57. package/dist/{chunk-OTZU76DH.js → chunk-XAF3CYCW.js} +1 -1
  58. package/dist/{chunk-T6GMRZWC.js → chunk-XTYQCTDD.js} +1 -1
  59. package/dist/{chunk-TIXVEPS2.js → chunk-YN7OI5ZV.js} +1 -1
  60. package/dist/cli/neuroverse.cjs +999 -111
  61. package/dist/cli/neuroverse.js +16 -12
  62. package/dist/cli/plan.cjs +18 -0
  63. package/dist/cli/radiant.cjs +814 -17
  64. package/dist/cli/radiant.d.cts +44 -1
  65. package/dist/cli/radiant.d.ts +44 -1
  66. package/dist/cli/radiant.js +295 -7
  67. package/dist/cli/run.cjs +18 -0
  68. package/dist/cli/run.js +4 -4
  69. package/dist/{decision-flow-IJPNMVQK.js → decision-flow-5VI5YG6A.js} +2 -2
  70. package/dist/{demo-6W3YXLAX.js → demo-GYX6CYHC.js} +2 -2
  71. package/dist/engine/guard-engine.cjs +19 -1
  72. package/dist/engine/guard-engine.d.cts +21 -1
  73. package/dist/engine/guard-engine.d.ts +21 -1
  74. package/dist/engine/guard-engine.js +1 -1
  75. package/dist/{equity-penalties-CCO3GVHS.js → equity-penalties-NOM46NEO.js} +2 -2
  76. package/dist/{guard-IHJEKHL2.js → guard-PQ3SYV4Y.js} +3 -3
  77. package/dist/{guard-contract-ddiIPlOg.d.cts → guard-contract-Oznf-Kgq.d.cts} +32 -0
  78. package/dist/{guard-contract-q6HJAq3Q.d.ts → guard-contract-w_i_6gh-.d.ts} +32 -0
  79. package/dist/{impact-WIAM66IH.js → impact-LDJLTVRU.js} +3 -3
  80. package/dist/index.cjs +62 -1
  81. package/dist/index.d.cts +4 -3
  82. package/dist/index.d.ts +4 -3
  83. package/dist/index.js +49 -8
  84. package/dist/{mcp-server-CKYBHXWK.js → mcp-server-W3MWSKD7.js} +2 -2
  85. package/dist/{playground-3TTBN7XD.js → playground-SSZRNUAF.js} +1 -1
  86. package/dist/radiant/index.cjs +517 -14
  87. package/dist/radiant/index.d.cts +180 -10
  88. package/dist/radiant/index.d.ts +180 -10
  89. package/dist/radiant/index.js +12 -2
  90. package/dist/{redteam-W644UMWN.js → redteam-KCULS7EW.js} +1 -1
  91. package/dist/{server-JKUBUK5H.js → server-EGRGGSM2.js} +2 -2
  92. package/dist/{session-FMAROEIE.js → session-PZLTL22G.js} +2 -2
  93. package/dist/{shared-PpalGKxc.d.cts → shared-BC8mOpt0.d.cts} +1 -1
  94. package/dist/{shared-DAzdfWtU.d.ts → shared-CP63gNNW.d.ts} +1 -1
  95. package/dist/{test-XDB2DH3L.js → test-LIHGWHBA.js} +1 -1
  96. package/dist/{trace-2YDNAXMK.js → trace-DC3D7XPD.js} +2 -2
  97. package/examples/radiant-weekly-workflow.yml +4 -1
  98. package/package.json +1 -1
  99. /package/dist/{doctor-XEMLO6UA.js → doctor-SIWQGTAO.js} +0 -0
package/README.md CHANGED
@@ -77,7 +77,7 @@ DEPTH — what Radiant can see now vs what unlocks with more reads
77
77
 
78
78
  ### Memory + evolution
79
79
 
80
- Radiant writes each read to the ExoCortex as a dated Memory Palace file. Next run reads prior history, detects pattern persistence, and proposes worldmodel evolution — what to ADD (recurring candidate patterns) and what to REMOVE (invariants that haven't fired). A lean worldmodel with 5 sharp invariants is stronger than a bloated one with 20.
80
+ Radiant writes each read to the ExoCortex as a dated Mind Palace file. Next run reads prior history, detects pattern persistence, and proposes worldmodel evolution — what to ADD (recurring candidate patterns) and what to REMOVE (invariants that haven't fired). A lean worldmodel with 5 sharp invariants is stronger than a bloated one with 20.
81
81
 
82
82
  ### MCP server
83
83
 
@@ -329,8 +329,26 @@ function isExternalScope(scope) {
329
329
  ];
330
330
  return !internalPatterns.some((p) => p.test(scope));
331
331
  }
332
- var MAX_INPUT_LENGTH = 1e5;
333
332
  function evaluateGuard(event, world, options = {}) {
333
+ const verdict = evaluateGuardCore(event, world, options);
334
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
335
+ }
336
+ function toShadowVerdict(verdict) {
337
+ if (verdict.status === "ALLOW") return verdict;
338
+ return {
339
+ ...verdict,
340
+ status: "ALLOW",
341
+ shadowStatus: verdict.status,
342
+ shadowReason: verdict.reason,
343
+ // Preserve the original reason as shadowReason and wipe the
344
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
345
+ // don't accidentally surface an enforcement message.
346
+ reason: void 0,
347
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
348
+ };
349
+ }
350
+ var MAX_INPUT_LENGTH = 1e5;
351
+ function evaluateGuardCore(event, world, options = {}) {
334
352
  const startTime = performance.now();
335
353
  const level = options.level ?? "standard";
336
354
  const includeTrace = options.trace ?? false;
@@ -1,4 +1,4 @@
1
- import { a as GuardEvent, G as GuardVerdict } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { a as GuardEvent, G as GuardVerdict } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as GuardEvent, G as GuardVerdict } from '../guard-contract-q6HJAq3Q.js';
1
+ import { a as GuardEvent, G as GuardVerdict } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
3
 
4
4
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AutoresearchGovernor,
3
3
  createAutoresearchGovernor
4
- } from "../chunk-TJ5L2UTE.js";
4
+ } from "../chunk-5K3LATTM.js";
5
5
  import "../chunk-I4RTIMLX.js";
6
- import "../chunk-ZAF6JH23.js";
6
+ import "../chunk-MBOW6YXN.js";
7
7
  import "../chunk-QLPTHTVB.js";
8
8
  import "../chunk-QWGCMQQD.js";
9
9
  export {
@@ -366,8 +366,26 @@ function isExternalScope(scope) {
366
366
  ];
367
367
  return !internalPatterns.some((p) => p.test(scope));
368
368
  }
369
- var MAX_INPUT_LENGTH = 1e5;
370
369
  function evaluateGuard(event, world, options = {}) {
370
+ const verdict = evaluateGuardCore(event, world, options);
371
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
372
+ }
373
+ function toShadowVerdict(verdict) {
374
+ if (verdict.status === "ALLOW") return verdict;
375
+ return {
376
+ ...verdict,
377
+ status: "ALLOW",
378
+ shadowStatus: verdict.status,
379
+ shadowReason: verdict.reason,
380
+ // Preserve the original reason as shadowReason and wipe the
381
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
382
+ // don't accidentally surface an enforcement message.
383
+ reason: void 0,
384
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
385
+ };
386
+ }
387
+ var MAX_INPUT_LENGTH = 1e5;
388
+ function evaluateGuardCore(event, world, options = {}) {
371
389
  const startTime = performance.now();
372
390
  const level = options.level ?? "standard";
373
391
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { b as GuardEngineOptions, P as PlanDefinition, G as GuardVerdict, a as GuardEvent, c as PlanProgress } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { b as GuardEngineOptions, P as PlanDefinition, G as GuardVerdict, a as GuardEvent, c as PlanProgress } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- import { G as GovernanceBlockedError$1 } from '../shared-PpalGKxc.cjs';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * Centralized Tool Classification & Risk Pattern Detection
@@ -1,6 +1,6 @@
1
- import { b as GuardEngineOptions, P as PlanDefinition, G as GuardVerdict, a as GuardEvent, c as PlanProgress } from '../guard-contract-q6HJAq3Q.js';
1
+ import { b as GuardEngineOptions, P as PlanDefinition, G as GuardVerdict, a as GuardEvent, c as PlanProgress } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- import { G as GovernanceBlockedError$1 } from '../shared-DAzdfWtU.js';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * Centralized Tool Classification & Risk Pattern Detection
@@ -3,10 +3,10 @@ import {
3
3
  GovernanceBlockedError,
4
4
  createDeepAgentsGuard,
5
5
  createDeepAgentsGuardFromWorld
6
- } from "../chunk-T6GMRZWC.js";
6
+ } from "../chunk-XTYQCTDD.js";
7
7
  import "../chunk-5U2MQO5P.js";
8
8
  import "../chunk-I4RTIMLX.js";
9
- import "../chunk-ZAF6JH23.js";
9
+ import "../chunk-MBOW6YXN.js";
10
10
  import "../chunk-QLPTHTVB.js";
11
11
  import "../chunk-QWGCMQQD.js";
12
12
  export {
@@ -329,8 +329,26 @@ function isExternalScope(scope) {
329
329
  ];
330
330
  return !internalPatterns.some((p) => p.test(scope));
331
331
  }
332
- var MAX_INPUT_LENGTH = 1e5;
333
332
  function evaluateGuard(event, world, options = {}) {
333
+ const verdict = evaluateGuardCore(event, world, options);
334
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
335
+ }
336
+ function toShadowVerdict(verdict) {
337
+ if (verdict.status === "ALLOW") return verdict;
338
+ return {
339
+ ...verdict,
340
+ status: "ALLOW",
341
+ shadowStatus: verdict.status,
342
+ shadowReason: verdict.reason,
343
+ // Preserve the original reason as shadowReason and wipe the
344
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
345
+ // don't accidentally surface an enforcement message.
346
+ reason: void 0,
347
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
348
+ };
349
+ }
350
+ var MAX_INPUT_LENGTH = 1e5;
351
+ function evaluateGuardCore(event, world, options = {}) {
334
352
  const startTime = performance.now();
335
353
  const level = options.level ?? "standard";
336
354
  const includeTrace = options.trace ?? false;
@@ -1,4 +1,4 @@
1
- import { G as GuardVerdict, a as GuardEvent } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { G as GuardVerdict, a as GuardEvent } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { G as GuardVerdict, a as GuardEvent } from '../guard-contract-q6HJAq3Q.js';
1
+ import { G as GuardVerdict, a as GuardEvent } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
3
 
4
4
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createGovernanceMiddleware,
3
3
  createGovernanceMiddlewareFromWorld
4
- } from "../chunk-HDNDL6D5.js";
4
+ } from "../chunk-5LDBYOSJ.js";
5
5
  import "../chunk-I4RTIMLX.js";
6
- import "../chunk-ZAF6JH23.js";
6
+ import "../chunk-MBOW6YXN.js";
7
7
  import "../chunk-QLPTHTVB.js";
8
8
  import "../chunk-QWGCMQQD.js";
9
9
  export {
@@ -371,8 +371,26 @@ function isExternalScope(scope) {
371
371
  ];
372
372
  return !internalPatterns.some((p) => p.test(scope));
373
373
  }
374
- var MAX_INPUT_LENGTH = 1e5;
375
374
  function evaluateGuard(event, world, options = {}) {
375
+ const verdict = evaluateGuardCore(event, world, options);
376
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
377
+ }
378
+ function toShadowVerdict(verdict) {
379
+ if (verdict.status === "ALLOW") return verdict;
380
+ return {
381
+ ...verdict,
382
+ status: "ALLOW",
383
+ shadowStatus: verdict.status,
384
+ shadowReason: verdict.reason,
385
+ // Preserve the original reason as shadowReason and wipe the
386
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
387
+ // don't accidentally surface an enforcement message.
388
+ reason: void 0,
389
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
390
+ };
391
+ }
392
+ var MAX_INPUT_LENGTH = 1e5;
393
+ function evaluateGuardCore(event, world, options = {}) {
376
394
  const startTime = performance.now();
377
395
  const level = options.level ?? "standard";
378
396
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, a as GuardEvent, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { G as GuardVerdict, a as GuardEvent, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- import { G as GovernanceBlockedError } from '../shared-PpalGKxc.cjs';
3
+ import { G as GovernanceBlockedError } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — GitHub
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, a as GuardEvent, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-q6HJAq3Q.js';
1
+ import { G as GuardVerdict, a as GuardEvent, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- import { G as GovernanceBlockedError } from '../shared-DAzdfWtU.js';
3
+ import { G as GovernanceBlockedError } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — GitHub
@@ -8,10 +8,10 @@ import {
8
8
  createGitHubWebhookHandlerFromWorld,
9
9
  formatForActions,
10
10
  formatPRComment
11
- } from "../chunk-A2UZTLRV.js";
11
+ } from "../chunk-MLXKSX3L.js";
12
12
  import "../chunk-5U2MQO5P.js";
13
13
  import "../chunk-I4RTIMLX.js";
14
- import "../chunk-ZAF6JH23.js";
14
+ import "../chunk-MBOW6YXN.js";
15
15
  import "../chunk-QLPTHTVB.js";
16
16
  import "../chunk-QWGCMQQD.js";
17
17
  export {
@@ -448,8 +448,26 @@ function isExternalScope(scope) {
448
448
  ];
449
449
  return !internalPatterns.some((p) => p.test(scope));
450
450
  }
451
- var MAX_INPUT_LENGTH = 1e5;
452
451
  function evaluateGuard(event, world, options = {}) {
452
+ const verdict = evaluateGuardCore(event, world, options);
453
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
454
+ }
455
+ function toShadowVerdict(verdict) {
456
+ if (verdict.status === "ALLOW") return verdict;
457
+ return {
458
+ ...verdict,
459
+ status: "ALLOW",
460
+ shadowStatus: verdict.status,
461
+ shadowReason: verdict.reason,
462
+ // Preserve the original reason as shadowReason and wipe the
463
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
464
+ // don't accidentally surface an enforcement message.
465
+ reason: void 0,
466
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
467
+ };
468
+ }
469
+ var MAX_INPUT_LENGTH = 1e5;
470
+ function evaluateGuardCore(event, world, options = {}) {
453
471
  const startTime = performance.now();
454
472
  const level = options.level ?? "standard";
455
473
  const includeTrace = options.trace ?? false;
@@ -1,4 +1,4 @@
1
- export { B as BaseAdapterOptions, G as GovernanceBlockedError, G as MentraGovernanceBlockedError, P as PlanTrackingCallbacks, a as PlanTrackingState, b as buildEngineOptions, d as defaultBlockMessage, e as extractScope, t as trackPlanProgress } from '../shared-PpalGKxc.cjs';
1
+ export { B as BaseAdapterOptions, G as GovernanceBlockedError, G as MentraGovernanceBlockedError, P as PlanTrackingCallbacks, a as PlanTrackingState, b as buildEngineOptions, d as defaultBlockMessage, e as extractScope, t as trackPlanProgress } from '../shared-BC8mOpt0.cjs';
2
2
  export { GovernanceBlockedError as LangChainGovernanceBlockedError, NeuroVerseCallbackHandler, NeuroVerseHandlerOptions, createNeuroVerseCallbackHandler, createNeuroVerseCallbackHandlerFromWorld } from './langchain.cjs';
3
3
  export { GovernedExecutorOptions, GovernedToolExecutor, GovernedToolResult, GovernanceBlockedError as OpenAIGovernanceBlockedError, OpenAIToolCall, createGovernedToolExecutor, createGovernedToolExecutorFromWorld } from './openai.cjs';
4
4
  export { AgentAction, HookResult, NeuroVersePlugin, NeuroVersePluginOptions, GovernanceBlockedError as OpenClawGovernanceBlockedError, createNeuroVersePlugin, createNeuroVersePluginFromWorld } from './openclaw.cjs';
@@ -6,5 +6,5 @@ export { GovernanceMiddlewareOptions, GovernanceRequest, GovernanceResponse, cre
6
6
  export { AutoresearchGovernor, AutoresearchGovernorConfig, ExperimentProposal, ExperimentResult, ResearchState } from './autoresearch.cjs';
7
7
  export { GovernanceBlockedError as DeepAgentsGovernanceBlockedError, DeepAgentsGuard, DeepAgentsGuardOptions, DeepAgentsGuardResult, DeepAgentsToolCall, DeepAgentsToolCategory, createDeepAgentsGuard, createDeepAgentsGuardFromWorld } from './deep-agents.cjs';
8
8
  export { AppContext, DEFAULT_USER_RULES, GlassesModel, MENTRA_INTENT_TAXONOMY, MENTRA_KNOWN_INTENTS, MentraDomain, MentraExecutorOptions, MentraGovernedExecutor, MentraGuardResult, MentraIntentDefinition, MentraPermission, UserRules, createMentraGovernedExecutor, createMentraGovernedExecutorFromWorld, evaluateUserRules, getAIActionIntents, getAIDataIntents, getAIIntents, getExfiltrationIntents, getHighRiskIntents, getIntentsByGlasses, getIntentsByPermission, getMentraIntent, isAIIntent, isIntentSupported } from './mentraos.cjs';
9
- import '../guard-contract-ddiIPlOg.cjs';
9
+ import '../guard-contract-Oznf-Kgq.cjs';
10
10
  import '../types.cjs';
@@ -1,4 +1,4 @@
1
- export { B as BaseAdapterOptions, G as GovernanceBlockedError, G as MentraGovernanceBlockedError, P as PlanTrackingCallbacks, a as PlanTrackingState, b as buildEngineOptions, d as defaultBlockMessage, e as extractScope, t as trackPlanProgress } from '../shared-DAzdfWtU.js';
1
+ export { B as BaseAdapterOptions, G as GovernanceBlockedError, G as MentraGovernanceBlockedError, P as PlanTrackingCallbacks, a as PlanTrackingState, b as buildEngineOptions, d as defaultBlockMessage, e as extractScope, t as trackPlanProgress } from '../shared-CP63gNNW.js';
2
2
  export { GovernanceBlockedError as LangChainGovernanceBlockedError, NeuroVerseCallbackHandler, NeuroVerseHandlerOptions, createNeuroVerseCallbackHandler, createNeuroVerseCallbackHandlerFromWorld } from './langchain.js';
3
3
  export { GovernedExecutorOptions, GovernedToolExecutor, GovernedToolResult, GovernanceBlockedError as OpenAIGovernanceBlockedError, OpenAIToolCall, createGovernedToolExecutor, createGovernedToolExecutorFromWorld } from './openai.js';
4
4
  export { AgentAction, HookResult, NeuroVersePlugin, NeuroVersePluginOptions, GovernanceBlockedError as OpenClawGovernanceBlockedError, createNeuroVersePlugin, createNeuroVersePluginFromWorld } from './openclaw.js';
@@ -6,5 +6,5 @@ export { GovernanceMiddlewareOptions, GovernanceRequest, GovernanceResponse, cre
6
6
  export { AutoresearchGovernor, AutoresearchGovernorConfig, ExperimentProposal, ExperimentResult, ResearchState } from './autoresearch.js';
7
7
  export { GovernanceBlockedError as DeepAgentsGovernanceBlockedError, DeepAgentsGuard, DeepAgentsGuardOptions, DeepAgentsGuardResult, DeepAgentsToolCall, DeepAgentsToolCategory, createDeepAgentsGuard, createDeepAgentsGuardFromWorld } from './deep-agents.js';
8
8
  export { AppContext, DEFAULT_USER_RULES, GlassesModel, MENTRA_INTENT_TAXONOMY, MENTRA_KNOWN_INTENTS, MentraDomain, MentraExecutorOptions, MentraGovernedExecutor, MentraGuardResult, MentraIntentDefinition, MentraPermission, UserRules, createMentraGovernedExecutor, createMentraGovernedExecutorFromWorld, evaluateUserRules, getAIActionIntents, getAIDataIntents, getAIIntents, getExfiltrationIntents, getHighRiskIntents, getIntentsByGlasses, getIntentsByPermission, getMentraIntent, isAIIntent, isIntentSupported } from './mentraos.js';
9
- import '../guard-contract-q6HJAq3Q.js';
9
+ import '../guard-contract-w_i_6gh-.js';
10
10
  import '../types.js';
@@ -4,19 +4,19 @@ import {
4
4
  createMentraGovernedExecutor,
5
5
  createMentraGovernedExecutorFromWorld,
6
6
  evaluateUserRules
7
- } from "../chunk-IOVXB6QN.js";
7
+ } from "../chunk-GXTAHCND.js";
8
8
  import {
9
9
  GovernanceBlockedError as GovernanceBlockedError4,
10
10
  GovernedToolExecutor,
11
11
  createGovernedToolExecutor,
12
12
  createGovernedToolExecutorFromWorld
13
- } from "../chunk-B3IIPTY3.js";
13
+ } from "../chunk-6MB6TMAG.js";
14
14
  import {
15
15
  GovernanceBlockedError as GovernanceBlockedError5,
16
16
  NeuroVersePlugin,
17
17
  createNeuroVersePlugin,
18
18
  createNeuroVersePluginFromWorld
19
- } from "../chunk-TIXVEPS2.js";
19
+ } from "../chunk-YN7OI5ZV.js";
20
20
  import {
21
21
  MENTRA_INTENT_TAXONOMY,
22
22
  MENTRA_KNOWN_INTENTS,
@@ -33,23 +33,23 @@ import {
33
33
  } from "../chunk-GJ6LM4JZ.js";
34
34
  import {
35
35
  AutoresearchGovernor
36
- } from "../chunk-TJ5L2UTE.js";
36
+ } from "../chunk-5K3LATTM.js";
37
37
  import {
38
38
  DeepAgentsGuard,
39
39
  GovernanceBlockedError as GovernanceBlockedError2,
40
40
  createDeepAgentsGuard,
41
41
  createDeepAgentsGuardFromWorld
42
- } from "../chunk-T6GMRZWC.js";
42
+ } from "../chunk-XTYQCTDD.js";
43
43
  import {
44
44
  createGovernanceMiddleware,
45
45
  createGovernanceMiddlewareFromWorld
46
- } from "../chunk-HDNDL6D5.js";
46
+ } from "../chunk-5LDBYOSJ.js";
47
47
  import {
48
48
  GovernanceBlockedError as GovernanceBlockedError3,
49
49
  NeuroVerseCallbackHandler,
50
50
  createNeuroVerseCallbackHandler,
51
51
  createNeuroVerseCallbackHandlerFromWorld
52
- } from "../chunk-FKQCPRKI.js";
52
+ } from "../chunk-MAOIHKFO.js";
53
53
  import {
54
54
  GovernanceBlockedError,
55
55
  buildEngineOptions,
@@ -58,7 +58,7 @@ import {
58
58
  trackPlanProgress
59
59
  } from "../chunk-5U2MQO5P.js";
60
60
  import "../chunk-I4RTIMLX.js";
61
- import "../chunk-ZAF6JH23.js";
61
+ import "../chunk-MBOW6YXN.js";
62
62
  import "../chunk-QLPTHTVB.js";
63
63
  import "../chunk-QWGCMQQD.js";
64
64
  export {
@@ -366,8 +366,26 @@ function isExternalScope(scope) {
366
366
  ];
367
367
  return !internalPatterns.some((p) => p.test(scope));
368
368
  }
369
- var MAX_INPUT_LENGTH = 1e5;
370
369
  function evaluateGuard(event, world, options = {}) {
370
+ const verdict = evaluateGuardCore(event, world, options);
371
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
372
+ }
373
+ function toShadowVerdict(verdict) {
374
+ if (verdict.status === "ALLOW") return verdict;
375
+ return {
376
+ ...verdict,
377
+ status: "ALLOW",
378
+ shadowStatus: verdict.status,
379
+ shadowReason: verdict.reason,
380
+ // Preserve the original reason as shadowReason and wipe the
381
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
382
+ // don't accidentally surface an enforcement message.
383
+ reason: void 0,
384
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
385
+ };
386
+ }
387
+ var MAX_INPUT_LENGTH = 1e5;
388
+ function evaluateGuardCore(event, world, options = {}) {
371
389
  const startTime = performance.now();
372
390
  const level = options.level ?? "standard";
373
391
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { a as GuardEvent, G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { a as GuardEvent, G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- import { G as GovernanceBlockedError$1 } from '../shared-PpalGKxc.cjs';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — LangChain
@@ -1,6 +1,6 @@
1
- import { a as GuardEvent, G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-q6HJAq3Q.js';
1
+ import { a as GuardEvent, G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, c as PlanProgress } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- import { G as GovernanceBlockedError$1 } from '../shared-DAzdfWtU.js';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — LangChain
@@ -3,10 +3,10 @@ import {
3
3
  NeuroVerseCallbackHandler,
4
4
  createNeuroVerseCallbackHandler,
5
5
  createNeuroVerseCallbackHandlerFromWorld
6
- } from "../chunk-FKQCPRKI.js";
6
+ } from "../chunk-MAOIHKFO.js";
7
7
  import "../chunk-5U2MQO5P.js";
8
8
  import "../chunk-I4RTIMLX.js";
9
- import "../chunk-ZAF6JH23.js";
9
+ import "../chunk-MBOW6YXN.js";
10
10
  import "../chunk-QLPTHTVB.js";
11
11
  import "../chunk-QWGCMQQD.js";
12
12
  export {
@@ -381,8 +381,26 @@ function isExternalScope(scope) {
381
381
  ];
382
382
  return !internalPatterns.some((p) => p.test(scope));
383
383
  }
384
- var MAX_INPUT_LENGTH = 1e5;
385
384
  function evaluateGuard(event, world, options = {}) {
385
+ const verdict = evaluateGuardCore(event, world, options);
386
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
387
+ }
388
+ function toShadowVerdict(verdict) {
389
+ if (verdict.status === "ALLOW") return verdict;
390
+ return {
391
+ ...verdict,
392
+ status: "ALLOW",
393
+ shadowStatus: verdict.status,
394
+ shadowReason: verdict.reason,
395
+ // Preserve the original reason as shadowReason and wipe the
396
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
397
+ // don't accidentally surface an enforcement message.
398
+ reason: void 0,
399
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
400
+ };
401
+ }
402
+ var MAX_INPUT_LENGTH = 1e5;
403
+ function evaluateGuardCore(event, world, options = {}) {
386
404
  const startTime = performance.now();
387
405
  const level = options.level ?? "standard";
388
406
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, P as PlanDefinition, c as PlanProgress } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { G as GuardVerdict, P as PlanDefinition, c as PlanProgress } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- export { G as GovernanceBlockedError } from '../shared-PpalGKxc.cjs';
3
+ export { G as GovernanceBlockedError } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * MentraOS Intent Taxonomy — Canonical Intent-to-SDK Mapping
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, P as PlanDefinition, c as PlanProgress } from '../guard-contract-q6HJAq3Q.js';
1
+ import { G as GuardVerdict, P as PlanDefinition, c as PlanProgress } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- export { G as GovernanceBlockedError } from '../shared-DAzdfWtU.js';
3
+ export { G as GovernanceBlockedError } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * MentraOS Intent Taxonomy — Canonical Intent-to-SDK Mapping
@@ -4,7 +4,7 @@ import {
4
4
  createMentraGovernedExecutor,
5
5
  createMentraGovernedExecutorFromWorld,
6
6
  evaluateUserRules
7
- } from "../chunk-IOVXB6QN.js";
7
+ } from "../chunk-GXTAHCND.js";
8
8
  import {
9
9
  MENTRA_INTENT_MAP,
10
10
  MENTRA_INTENT_TAXONOMY,
@@ -24,7 +24,7 @@ import {
24
24
  GovernanceBlockedError
25
25
  } from "../chunk-5U2MQO5P.js";
26
26
  import "../chunk-I4RTIMLX.js";
27
- import "../chunk-ZAF6JH23.js";
27
+ import "../chunk-MBOW6YXN.js";
28
28
  import "../chunk-QLPTHTVB.js";
29
29
  import "../chunk-QWGCMQQD.js";
30
30
  export {
@@ -366,8 +366,26 @@ function isExternalScope(scope) {
366
366
  ];
367
367
  return !internalPatterns.some((p) => p.test(scope));
368
368
  }
369
- var MAX_INPUT_LENGTH = 1e5;
370
369
  function evaluateGuard(event, world, options = {}) {
370
+ const verdict = evaluateGuardCore(event, world, options);
371
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
372
+ }
373
+ function toShadowVerdict(verdict) {
374
+ if (verdict.status === "ALLOW") return verdict;
375
+ return {
376
+ ...verdict,
377
+ status: "ALLOW",
378
+ shadowStatus: verdict.status,
379
+ shadowReason: verdict.reason,
380
+ // Preserve the original reason as shadowReason and wipe the
381
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
382
+ // don't accidentally surface an enforcement message.
383
+ reason: void 0,
384
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
385
+ };
386
+ }
387
+ var MAX_INPUT_LENGTH = 1e5;
388
+ function evaluateGuardCore(event, world, options = {}) {
371
389
  const startTime = performance.now();
372
390
  const level = options.level ?? "standard";
373
391
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, a as GuardEvent, P as PlanDefinition, c as PlanProgress, b as GuardEngineOptions } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { G as GuardVerdict, a as GuardEvent, P as PlanDefinition, c as PlanProgress, b as GuardEngineOptions } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- import { G as GovernanceBlockedError$1 } from '../shared-PpalGKxc.cjs';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — OpenAI
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, a as GuardEvent, P as PlanDefinition, c as PlanProgress, b as GuardEngineOptions } from '../guard-contract-q6HJAq3Q.js';
1
+ import { G as GuardVerdict, a as GuardEvent, P as PlanDefinition, c as PlanProgress, b as GuardEngineOptions } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- import { G as GovernanceBlockedError$1 } from '../shared-DAzdfWtU.js';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — OpenAI
@@ -3,10 +3,10 @@ import {
3
3
  GovernedToolExecutor,
4
4
  createGovernedToolExecutor,
5
5
  createGovernedToolExecutorFromWorld
6
- } from "../chunk-B3IIPTY3.js";
6
+ } from "../chunk-6MB6TMAG.js";
7
7
  import "../chunk-5U2MQO5P.js";
8
8
  import "../chunk-I4RTIMLX.js";
9
- import "../chunk-ZAF6JH23.js";
9
+ import "../chunk-MBOW6YXN.js";
10
10
  import "../chunk-QLPTHTVB.js";
11
11
  import "../chunk-QWGCMQQD.js";
12
12
  export {
@@ -366,8 +366,26 @@ function isExternalScope(scope) {
366
366
  ];
367
367
  return !internalPatterns.some((p) => p.test(scope));
368
368
  }
369
- var MAX_INPUT_LENGTH = 1e5;
370
369
  function evaluateGuard(event, world, options = {}) {
370
+ const verdict = evaluateGuardCore(event, world, options);
371
+ return options.mode === "observe" ? toShadowVerdict(verdict) : verdict;
372
+ }
373
+ function toShadowVerdict(verdict) {
374
+ if (verdict.status === "ALLOW") return verdict;
375
+ return {
376
+ ...verdict,
377
+ status: "ALLOW",
378
+ shadowStatus: verdict.status,
379
+ shadowReason: verdict.reason,
380
+ // Preserve the original reason as shadowReason and wipe the
381
+ // top-level reason so callers that display `reason` for BLOCK/PAUSE
382
+ // don't accidentally surface an enforcement message.
383
+ reason: void 0,
384
+ warning: verdict.reason ? `Observe mode: would have ${verdict.status.toLowerCase()} \u2014 ${verdict.reason}` : `Observe mode: would have ${verdict.status.toLowerCase()}`
385
+ };
386
+ }
387
+ var MAX_INPUT_LENGTH = 1e5;
388
+ function evaluateGuardCore(event, world, options = {}) {
371
389
  const startTime = performance.now();
372
390
  const level = options.level ?? "standard";
373
391
  const includeTrace = options.trace ?? false;
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, a as GuardEvent, c as PlanProgress } from '../guard-contract-ddiIPlOg.cjs';
1
+ import { G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, a as GuardEvent, c as PlanProgress } from '../guard-contract-Oznf-Kgq.cjs';
2
2
  import { WorldDefinition } from '../types.cjs';
3
- import { G as GovernanceBlockedError$1 } from '../shared-PpalGKxc.cjs';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-BC8mOpt0.cjs';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — OpenClaw
@@ -1,6 +1,6 @@
1
- import { G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, a as GuardEvent, c as PlanProgress } from '../guard-contract-q6HJAq3Q.js';
1
+ import { G as GuardVerdict, b as GuardEngineOptions, P as PlanDefinition, a as GuardEvent, c as PlanProgress } from '../guard-contract-w_i_6gh-.js';
2
2
  import { WorldDefinition } from '../types.js';
3
- import { G as GovernanceBlockedError$1 } from '../shared-DAzdfWtU.js';
3
+ import { G as GovernanceBlockedError$1 } from '../shared-CP63gNNW.js';
4
4
 
5
5
  /**
6
6
  * NeuroVerse Adapter — OpenClaw
@@ -3,10 +3,10 @@ import {
3
3
  NeuroVersePlugin,
4
4
  createNeuroVersePlugin,
5
5
  createNeuroVersePluginFromWorld
6
- } from "../chunk-TIXVEPS2.js";
6
+ } from "../chunk-YN7OI5ZV.js";
7
7
  import "../chunk-5U2MQO5P.js";
8
8
  import "../chunk-I4RTIMLX.js";
9
- import "../chunk-ZAF6JH23.js";
9
+ import "../chunk-MBOW6YXN.js";
10
10
  import "../chunk-QLPTHTVB.js";
11
11
  import "../chunk-QWGCMQQD.js";
12
12
  export {