@neuroverseos/governance 0.3.1 → 0.3.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 (132) hide show
  1. package/.well-known/ai-plugin.json +34 -9
  2. package/AGENTS.md +72 -24
  3. package/README.md +343 -248
  4. package/dist/adapters/autoresearch.cjs +1345 -0
  5. package/dist/adapters/autoresearch.d.cts +111 -0
  6. package/dist/adapters/autoresearch.d.ts +111 -0
  7. package/dist/adapters/autoresearch.js +12 -0
  8. package/dist/adapters/deep-agents.cjs +1528 -0
  9. package/dist/adapters/deep-agents.d.cts +181 -0
  10. package/dist/adapters/deep-agents.d.ts +181 -0
  11. package/dist/adapters/deep-agents.js +17 -0
  12. package/dist/adapters/express.cjs +1253 -0
  13. package/dist/adapters/express.d.cts +66 -0
  14. package/dist/adapters/express.d.ts +66 -0
  15. package/dist/adapters/express.js +12 -0
  16. package/dist/adapters/index.cjs +2112 -0
  17. package/dist/adapters/index.d.cts +8 -0
  18. package/dist/adapters/index.d.ts +8 -0
  19. package/dist/adapters/index.js +68 -0
  20. package/dist/adapters/langchain.cjs +1315 -0
  21. package/dist/adapters/langchain.d.cts +89 -0
  22. package/dist/adapters/langchain.d.ts +89 -0
  23. package/dist/adapters/langchain.js +17 -0
  24. package/dist/adapters/openai.cjs +1345 -0
  25. package/dist/adapters/openai.d.cts +99 -0
  26. package/dist/adapters/openai.d.ts +99 -0
  27. package/dist/adapters/openai.js +17 -0
  28. package/dist/adapters/openclaw.cjs +1337 -0
  29. package/dist/adapters/openclaw.d.cts +99 -0
  30. package/dist/adapters/openclaw.d.ts +99 -0
  31. package/dist/adapters/openclaw.js +17 -0
  32. package/dist/add-ROOZLU62.js +314 -0
  33. package/dist/behavioral-MJO34S6Q.js +118 -0
  34. package/dist/bootstrap-CQRZVOXK.js +116 -0
  35. package/dist/bootstrap-emitter-Q7UIJZ2O.js +7 -0
  36. package/dist/bootstrap-parser-EEF36XDU.js +7 -0
  37. package/dist/browser.global.js +941 -0
  38. package/dist/build-QKOBBC23.js +341 -0
  39. package/dist/chunk-3WQLXYTP.js +91 -0
  40. package/dist/chunk-4FLICVVA.js +119 -0
  41. package/dist/chunk-4NGDRRQH.js +10 -0
  42. package/dist/chunk-5TPFNWRU.js +215 -0
  43. package/dist/chunk-5U2MQO5P.js +57 -0
  44. package/dist/chunk-6CZSKEY5.js +164 -0
  45. package/dist/chunk-6S5CFQXY.js +624 -0
  46. package/dist/chunk-7P3S7MAY.js +1090 -0
  47. package/dist/chunk-A5W4GNQO.js +130 -0
  48. package/dist/chunk-A7GKPPU7.js +226 -0
  49. package/dist/chunk-AKW5YVCE.js +96 -0
  50. package/dist/chunk-B6OXJLJ5.js +622 -0
  51. package/dist/chunk-BNKJPUPQ.js +113 -0
  52. package/dist/chunk-BQZMOEML.js +43 -0
  53. package/dist/chunk-CNSO6XW5.js +207 -0
  54. package/dist/chunk-CTZHONLA.js +135 -0
  55. package/dist/chunk-D2UCV5AK.js +326 -0
  56. package/dist/chunk-EMQDLDAF.js +458 -0
  57. package/dist/chunk-F66BVUYB.js +340 -0
  58. package/dist/chunk-G7DJ6VOD.js +101 -0
  59. package/dist/chunk-I3RRAYK2.js +11 -0
  60. package/dist/chunk-IS4WUH6Y.js +363 -0
  61. package/dist/chunk-MH7BT4VH.js +15 -0
  62. package/dist/chunk-O5ABKEA7.js +304 -0
  63. package/dist/chunk-OT6PXH54.js +61 -0
  64. package/dist/chunk-PVTQQS3Y.js +186 -0
  65. package/dist/chunk-Q6O7ZLO2.js +62 -0
  66. package/dist/chunk-QLPTHTVB.js +253 -0
  67. package/dist/chunk-QWGCMQQD.js +16 -0
  68. package/dist/chunk-QXBFT7NI.js +201 -0
  69. package/dist/chunk-TG6SEF24.js +246 -0
  70. package/dist/chunk-U6U7EJZL.js +177 -0
  71. package/dist/chunk-W7LLXRGY.js +830 -0
  72. package/dist/chunk-ZJTDUCC2.js +194 -0
  73. package/dist/chunk-ZWI3NIXK.js +314 -0
  74. package/dist/cli/neuroverse.cjs +14191 -0
  75. package/dist/cli/neuroverse.d.cts +1 -0
  76. package/dist/cli/neuroverse.d.ts +1 -0
  77. package/dist/cli/neuroverse.js +227 -0
  78. package/dist/cli/plan.cjs +2439 -0
  79. package/dist/cli/plan.d.cts +20 -0
  80. package/dist/cli/plan.d.ts +20 -0
  81. package/dist/cli/plan.js +353 -0
  82. package/dist/cli/run.cjs +2001 -0
  83. package/dist/cli/run.d.cts +20 -0
  84. package/dist/cli/run.d.ts +20 -0
  85. package/dist/cli/run.js +143 -0
  86. package/dist/configure-ai-6TZ3MCSI.js +132 -0
  87. package/dist/decision-flow-M63D47LO.js +61 -0
  88. package/dist/demo-G43RLCPK.js +469 -0
  89. package/dist/derive-FJZVIPUZ.js +153 -0
  90. package/dist/doctor-6BC6X2VO.js +173 -0
  91. package/dist/equity-penalties-SG5IZQ7I.js +244 -0
  92. package/dist/explain-RHBU2GBR.js +51 -0
  93. package/dist/guard-AJCCGZMF.js +92 -0
  94. package/dist/guard-contract-DqFcTScd.d.cts +821 -0
  95. package/dist/guard-contract-DqFcTScd.d.ts +821 -0
  96. package/dist/guard-engine-PNR6MHCM.js +10 -0
  97. package/dist/impact-3XVDSCBU.js +59 -0
  98. package/dist/improve-TQP4ECSY.js +66 -0
  99. package/dist/index.cjs +7591 -0
  100. package/dist/index.d.cts +2195 -0
  101. package/dist/index.d.ts +2195 -0
  102. package/dist/index.js +472 -0
  103. package/dist/infer-world-IFXCACJ5.js +543 -0
  104. package/dist/init-FYPV4SST.js +144 -0
  105. package/dist/init-world-TI7ARHBT.js +223 -0
  106. package/dist/mcp-server-5Y3ZM7TV.js +13 -0
  107. package/dist/model-adapter-VXEKB4LS.js +11 -0
  108. package/dist/playground-VZBNPPBO.js +560 -0
  109. package/dist/redteam-MZPZD3EF.js +357 -0
  110. package/dist/session-JYOARW54.js +15 -0
  111. package/dist/shared-7RLUHNMU.js +16 -0
  112. package/dist/shared-B8dvUUD8.d.cts +60 -0
  113. package/dist/shared-Dr5Wiay8.d.ts +60 -0
  114. package/dist/simulate-LJXYBC6M.js +83 -0
  115. package/dist/test-BOOR4A5F.js +217 -0
  116. package/dist/trace-PKV4KX56.js +166 -0
  117. package/dist/validate-RALX7CZS.js +81 -0
  118. package/dist/validate-engine-7ZXFVGF2.js +7 -0
  119. package/dist/viz/assets/index-B8SaeJZZ.js +23 -0
  120. package/dist/viz/index.html +23 -0
  121. package/dist/world-BIP4GZBZ.js +376 -0
  122. package/dist/world-loader-Y6HMQH2D.js +13 -0
  123. package/dist/worlds/autoresearch.nv-world.md +230 -0
  124. package/dist/worlds/coding-agent.nv-world.md +211 -0
  125. package/dist/worlds/derivation-world.nv-world.md +278 -0
  126. package/dist/worlds/research-agent.nv-world.md +169 -0
  127. package/dist/worlds/social-media.nv-world.md +198 -0
  128. package/dist/worlds/trading-agent.nv-world.md +218 -0
  129. package/examples/social-media-sim/bridge.py +209 -0
  130. package/examples/social-media-sim/simulation.py +927 -0
  131. package/package.json +16 -3
  132. package/simulate.html +4 -336
package/dist/index.js ADDED
@@ -0,0 +1,472 @@
1
+ import {
2
+ actionToGuardEvent,
3
+ createGovernor,
4
+ govern,
5
+ handleCreateCapsule,
6
+ handleHealthCheck,
7
+ handleListPresets,
8
+ handleReasonRequest,
9
+ writeTempWorld
10
+ } from "./chunk-U6U7EJZL.js";
11
+ import {
12
+ generateImpactReport,
13
+ generateImpactReportFromFile,
14
+ renderImpactReport
15
+ } from "./chunk-TG6SEF24.js";
16
+ import {
17
+ adaptationFromVerdict,
18
+ classifyAdaptation,
19
+ detectBehavioralPatterns,
20
+ generateAdaptationNarrative
21
+ } from "./chunk-CNSO6XW5.js";
22
+ import {
23
+ CompositeAuditLogger,
24
+ ConsoleAuditLogger,
25
+ FileAuditLogger,
26
+ createGovernanceEngine,
27
+ readAuditLog,
28
+ summarizeAuditEvents,
29
+ verdictToAuditEvent
30
+ } from "./chunk-A7GKPPU7.js";
31
+ import {
32
+ improveWorld,
33
+ renderImproveText
34
+ } from "./chunk-F66BVUYB.js";
35
+ import {
36
+ BOOTSTRAP_EXIT_CODES
37
+ } from "./chunk-4NGDRRQH.js";
38
+ import {
39
+ VALIDATE_EXIT_CODES
40
+ } from "./chunk-I3RRAYK2.js";
41
+ import {
42
+ GUARD_EXIT_CODES
43
+ } from "./chunk-MH7BT4VH.js";
44
+ import {
45
+ ModelAdapter,
46
+ PROVIDERS,
47
+ resolveProvider
48
+ } from "./chunk-A5W4GNQO.js";
49
+ import {
50
+ McpGovernanceServer
51
+ } from "./chunk-B6OXJLJ5.js";
52
+ import {
53
+ addGuard,
54
+ addInvariant,
55
+ addRule,
56
+ classifyIntent,
57
+ parseGuardDescription
58
+ } from "./chunk-5TPFNWRU.js";
59
+ import {
60
+ deriveWorld,
61
+ extractWorldMarkdown,
62
+ normalizeWorldMarkdown
63
+ } from "./chunk-6S5CFQXY.js";
64
+ import {
65
+ CONFIGURE_AI_EXIT_CODES,
66
+ DERIVE_EXIT_CODES
67
+ } from "./chunk-Q6O7ZLO2.js";
68
+ import "./chunk-OT6PXH54.js";
69
+ import {
70
+ validateWorld
71
+ } from "./chunk-7P3S7MAY.js";
72
+ import {
73
+ explainWorld,
74
+ renderExplainText
75
+ } from "./chunk-ZJTDUCC2.js";
76
+ import {
77
+ renderSimulateText,
78
+ simulateWorld
79
+ } from "./chunk-ZWI3NIXK.js";
80
+ import {
81
+ PLAN_EXIT_CODES,
82
+ parsePlanMarkdown
83
+ } from "./chunk-6CZSKEY5.js";
84
+ import {
85
+ describeActiveWorld,
86
+ getActiveWorldName,
87
+ listWorlds,
88
+ resolveWorldPath,
89
+ setActiveWorld
90
+ } from "./chunk-AKW5YVCE.js";
91
+ import {
92
+ parseWorldMarkdown
93
+ } from "./chunk-EMQDLDAF.js";
94
+ import {
95
+ emitWorldDefinition
96
+ } from "./chunk-PVTQQS3Y.js";
97
+ import {
98
+ SessionManager,
99
+ runInteractiveMode,
100
+ runPipeMode
101
+ } from "./chunk-IS4WUH6Y.js";
102
+ import {
103
+ applyConsequence,
104
+ applyReward,
105
+ createAgentState,
106
+ generateDecisionFlow,
107
+ renderDecisionFlow,
108
+ tickAgentStates
109
+ } from "./chunk-D2UCV5AK.js";
110
+ import {
111
+ evaluateGuard,
112
+ eventToAllowlistKey
113
+ } from "./chunk-W7LLXRGY.js";
114
+ import {
115
+ advancePlan,
116
+ buildPlanCheck,
117
+ evaluatePlan,
118
+ getPlanProgress
119
+ } from "./chunk-QLPTHTVB.js";
120
+ import {
121
+ loadWorld,
122
+ loadWorldFromDirectory
123
+ } from "./chunk-CTZHONLA.js";
124
+ import "./chunk-QWGCMQQD.js";
125
+
126
+ // src/engine/verdict-formatter.ts
127
+ var ANSI = {
128
+ red: "\x1B[31m",
129
+ green: "\x1B[32m",
130
+ yellow: "\x1B[33m",
131
+ blue: "\x1B[34m",
132
+ magenta: "\x1B[35m",
133
+ cyan: "\x1B[36m",
134
+ gray: "\x1B[90m",
135
+ bold: "\x1B[1m",
136
+ dim: "\x1B[2m",
137
+ reset: "\x1B[0m"
138
+ };
139
+ function c(text, ...codes) {
140
+ return codes.join("") + text + ANSI.reset;
141
+ }
142
+ function formatVerdict(verdict, options = {}) {
143
+ const {
144
+ showRuleId = true,
145
+ showEvidence = false,
146
+ showWarning = true,
147
+ color = false,
148
+ compact = false
149
+ } = options;
150
+ if (compact) {
151
+ return formatCompact(verdict, { showRuleId, showWarning, color });
152
+ }
153
+ return formatFull(verdict, { showRuleId, showEvidence, showWarning, color });
154
+ }
155
+ function formatCompact(verdict, opts) {
156
+ const status = formatStatus(verdict.status, opts.color);
157
+ const parts = [status];
158
+ if (opts.showRuleId && verdict.ruleId) {
159
+ parts.push(verdict.ruleId);
160
+ }
161
+ if (verdict.reason) {
162
+ parts.push(verdict.reason);
163
+ }
164
+ if (opts.showWarning && verdict.warning) {
165
+ parts.push(`warning: ${verdict.warning}`);
166
+ }
167
+ return parts.join(" \u2014 ");
168
+ }
169
+ function formatFull(verdict, opts) {
170
+ const lines = [];
171
+ lines.push(formatStatus(verdict.status, opts.color));
172
+ if (opts.showRuleId && verdict.ruleId) {
173
+ lines.push(` Rule: ${verdict.ruleId}`);
174
+ }
175
+ if (verdict.reason) {
176
+ lines.push(` Reason: ${verdict.reason}`);
177
+ }
178
+ if (verdict.consequence) {
179
+ const label = opts.color ? c("Consequence:", ANSI.red) : "Consequence:";
180
+ lines.push(` ${label} ${verdict.consequence.description}`);
181
+ if (verdict.consequence.rounds) {
182
+ lines.push(` Freeze: ${verdict.consequence.rounds} round(s)`);
183
+ }
184
+ if (verdict.consequence.magnitude) {
185
+ lines.push(` Magnitude: ${(verdict.consequence.magnitude * 100).toFixed(0)}%`);
186
+ }
187
+ }
188
+ if (verdict.reward) {
189
+ const label = opts.color ? c("Reward:", ANSI.blue) : "Reward:";
190
+ lines.push(` ${label} ${verdict.reward.description}`);
191
+ if (verdict.reward.rounds) {
192
+ lines.push(` Duration: ${verdict.reward.rounds} round(s)`);
193
+ }
194
+ if (verdict.reward.magnitude) {
195
+ lines.push(` Boost: ${(verdict.reward.magnitude * 100).toFixed(0)}%`);
196
+ }
197
+ }
198
+ if (verdict.intentRecord) {
199
+ const ir = verdict.intentRecord;
200
+ const label = opts.color ? c("Intent Flow:", ANSI.cyan) : "Intent Flow:";
201
+ lines.push(` ${label} ${ir.originalIntent} \u2192 ${ir.finalAction}`);
202
+ }
203
+ if (opts.showWarning && verdict.warning) {
204
+ const label = opts.color ? c("Warning:", ANSI.yellow) : "Warning:";
205
+ lines.push(` ${label} ${verdict.warning}`);
206
+ }
207
+ if (opts.showEvidence) {
208
+ const ev = verdict.evidence;
209
+ lines.push(` World: ${ev.worldName} v${ev.worldVersion}`);
210
+ lines.push(` Invariants: ${ev.invariantsSatisfied}/${ev.invariantsTotal} covered`);
211
+ if (ev.guardsMatched.length > 0) {
212
+ lines.push(` Guards matched: ${ev.guardsMatched.join(", ")}`);
213
+ }
214
+ if (ev.rulesMatched.length > 0) {
215
+ lines.push(` Rules matched: ${ev.rulesMatched.join(", ")}`);
216
+ }
217
+ lines.push(` Enforcement: ${ev.enforcementLevel}`);
218
+ }
219
+ return lines.join("\n");
220
+ }
221
+ function formatStatus(status, color) {
222
+ switch (status) {
223
+ case "ALLOW":
224
+ return color ? c("ALLOWED", ANSI.green, ANSI.bold) : "ALLOWED";
225
+ case "BLOCK":
226
+ return color ? c("BLOCKED", ANSI.red, ANSI.bold) : "BLOCKED";
227
+ case "PAUSE":
228
+ return color ? c("PAUSED", ANSI.yellow, ANSI.bold) : "PAUSED";
229
+ case "MODIFY":
230
+ return color ? c("MODIFIED", ANSI.yellow, ANSI.bold) : "MODIFIED";
231
+ case "PENALIZE":
232
+ return color ? c("PENALIZED", ANSI.red, ANSI.bold) : "PENALIZED";
233
+ case "REWARD":
234
+ return color ? c("REWARDED", ANSI.blue, ANSI.bold) : "REWARDED";
235
+ case "NEUTRAL":
236
+ return color ? c("NEUTRAL", ANSI.gray, ANSI.bold) : "NEUTRAL";
237
+ default:
238
+ return status;
239
+ }
240
+ }
241
+ function formatVerdictOneLine(verdict) {
242
+ const parts = [verdict.status];
243
+ if (verdict.ruleId) {
244
+ parts[0] += `: ${verdict.ruleId}`;
245
+ }
246
+ if (verdict.reason) {
247
+ parts.push(verdict.reason);
248
+ }
249
+ return parts.join(" \u2014 ");
250
+ }
251
+
252
+ // src/engine/condition-engine.ts
253
+ function getFieldValue(event, field) {
254
+ if (field.startsWith("args.")) {
255
+ const key = field.slice(5);
256
+ return event.args?.[key];
257
+ }
258
+ return event[field];
259
+ }
260
+ function toString(value) {
261
+ if (value === null || value === void 0) return "";
262
+ if (typeof value === "string") return value;
263
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
264
+ return JSON.stringify(value);
265
+ }
266
+ function evaluateCondition(condition, event) {
267
+ const fieldValue = getFieldValue(event, condition.field);
268
+ if (fieldValue === void 0 && condition.operator !== "!=") {
269
+ return { matched: false, evidence: null };
270
+ }
271
+ switch (condition.operator) {
272
+ case "==":
273
+ return evaluateEquals(fieldValue, condition.value);
274
+ case "!=":
275
+ return evaluateNotEquals(fieldValue, condition.value);
276
+ case ">":
277
+ return evaluateComparison(fieldValue, condition.value, (a, b) => a > b);
278
+ case "<":
279
+ return evaluateComparison(fieldValue, condition.value, (a, b) => a < b);
280
+ case ">=":
281
+ return evaluateComparison(fieldValue, condition.value, (a, b) => a >= b);
282
+ case "<=":
283
+ return evaluateComparison(fieldValue, condition.value, (a, b) => a <= b);
284
+ case "in":
285
+ return evaluateIn(fieldValue, condition.value);
286
+ case "contains":
287
+ return evaluateContains(fieldValue, condition.value);
288
+ case "contains_any":
289
+ return evaluateContainsAny(fieldValue, condition.value);
290
+ case "matches_pattern":
291
+ return evaluateMatchesPattern(fieldValue, condition.value);
292
+ case "starts_with":
293
+ return evaluateStartsWith(fieldValue, condition.value);
294
+ case "ends_with":
295
+ return evaluateEndsWith(fieldValue, condition.value);
296
+ default:
297
+ return { matched: false, evidence: null };
298
+ }
299
+ }
300
+ function evaluateEquals(fieldValue, conditionValue) {
301
+ const fieldStr = toString(fieldValue);
302
+ const condStr = toString(conditionValue);
303
+ const matched = fieldStr === condStr;
304
+ return {
305
+ matched,
306
+ evidence: matched ? `${fieldStr} == ${condStr}` : null
307
+ };
308
+ }
309
+ function evaluateNotEquals(fieldValue, conditionValue) {
310
+ const fieldStr = toString(fieldValue);
311
+ const condStr = toString(conditionValue);
312
+ const matched = fieldStr !== condStr;
313
+ return {
314
+ matched,
315
+ evidence: matched ? `${fieldStr} != ${condStr}` : null
316
+ };
317
+ }
318
+ function evaluateComparison(fieldValue, conditionValue, comparator) {
319
+ const a = Number(fieldValue);
320
+ const b = Number(conditionValue);
321
+ if (isNaN(a) || isNaN(b)) return { matched: false, evidence: null };
322
+ const matched = comparator(a, b);
323
+ return {
324
+ matched,
325
+ evidence: matched ? `${a} compared to ${b}` : null
326
+ };
327
+ }
328
+ function evaluateIn(fieldValue, conditionValue) {
329
+ if (!Array.isArray(conditionValue)) return { matched: false, evidence: null };
330
+ const fieldStr = toString(fieldValue);
331
+ const matched = conditionValue.some((v) => toString(v) === fieldStr);
332
+ return {
333
+ matched,
334
+ evidence: matched ? `"${fieldStr}" found in [${conditionValue.join(", ")}]` : null
335
+ };
336
+ }
337
+ function evaluateContains(fieldValue, conditionValue) {
338
+ const fieldStr = toString(fieldValue).toLowerCase();
339
+ const searchStr = toString(conditionValue).toLowerCase();
340
+ const matched = fieldStr.includes(searchStr);
341
+ return {
342
+ matched,
343
+ evidence: matched ? `"${searchStr}" found in field` : null
344
+ };
345
+ }
346
+ function evaluateContainsAny(fieldValue, conditionValue) {
347
+ if (!Array.isArray(conditionValue)) return { matched: false, evidence: null };
348
+ const fieldStr = toString(fieldValue).toLowerCase();
349
+ for (const pattern of conditionValue) {
350
+ const patternLower = toString(pattern).toLowerCase();
351
+ if (fieldStr.includes(patternLower)) {
352
+ return {
353
+ matched: true,
354
+ evidence: `"${patternLower}" found in field`
355
+ };
356
+ }
357
+ }
358
+ return { matched: false, evidence: null };
359
+ }
360
+ function evaluateMatchesPattern(fieldValue, conditionValue) {
361
+ const fieldStr = toString(fieldValue);
362
+ const patterns = Array.isArray(conditionValue) ? conditionValue : [toString(conditionValue)];
363
+ for (const pattern of patterns) {
364
+ try {
365
+ const regex = new RegExp(toString(pattern), "i");
366
+ if (regex.test(fieldStr)) {
367
+ return {
368
+ matched: true,
369
+ evidence: `matched pattern /${pattern}/`
370
+ };
371
+ }
372
+ } catch {
373
+ continue;
374
+ }
375
+ }
376
+ return { matched: false, evidence: null };
377
+ }
378
+ function evaluateStartsWith(fieldValue, conditionValue) {
379
+ const fieldStr = toString(fieldValue).toLowerCase();
380
+ const prefix = toString(conditionValue).toLowerCase();
381
+ const matched = fieldStr.startsWith(prefix);
382
+ return {
383
+ matched,
384
+ evidence: matched ? `field starts with "${prefix}"` : null
385
+ };
386
+ }
387
+ function evaluateEndsWith(fieldValue, conditionValue) {
388
+ const fieldStr = toString(fieldValue).toLowerCase();
389
+ const suffix = toString(conditionValue).toLowerCase();
390
+ const matched = fieldStr.endsWith(suffix);
391
+ return {
392
+ matched,
393
+ evidence: matched ? `field ends with "${suffix}"` : null
394
+ };
395
+ }
396
+ export {
397
+ BOOTSTRAP_EXIT_CODES,
398
+ CONFIGURE_AI_EXIT_CODES,
399
+ CompositeAuditLogger,
400
+ ConsoleAuditLogger,
401
+ DERIVE_EXIT_CODES,
402
+ FileAuditLogger,
403
+ GUARD_EXIT_CODES,
404
+ McpGovernanceServer,
405
+ ModelAdapter,
406
+ PLAN_EXIT_CODES,
407
+ PROVIDERS,
408
+ SessionManager,
409
+ VALIDATE_EXIT_CODES,
410
+ actionToGuardEvent,
411
+ adaptationFromVerdict,
412
+ addGuard,
413
+ addInvariant,
414
+ addRule,
415
+ advancePlan,
416
+ applyConsequence,
417
+ applyReward,
418
+ buildPlanCheck,
419
+ classifyAdaptation,
420
+ classifyIntent,
421
+ createAgentState,
422
+ createGovernanceEngine,
423
+ createGovernor,
424
+ deriveWorld,
425
+ describeActiveWorld,
426
+ detectBehavioralPatterns,
427
+ emitWorldDefinition,
428
+ evaluateCondition,
429
+ evaluateGuard,
430
+ evaluatePlan,
431
+ eventToAllowlistKey,
432
+ explainWorld,
433
+ extractWorldMarkdown,
434
+ formatVerdict,
435
+ formatVerdictOneLine,
436
+ generateAdaptationNarrative,
437
+ generateDecisionFlow,
438
+ generateImpactReport,
439
+ generateImpactReportFromFile,
440
+ getActiveWorldName,
441
+ getPlanProgress,
442
+ govern,
443
+ handleCreateCapsule,
444
+ handleHealthCheck,
445
+ handleListPresets,
446
+ handleReasonRequest,
447
+ improveWorld,
448
+ listWorlds,
449
+ loadWorld,
450
+ loadWorldFromDirectory,
451
+ normalizeWorldMarkdown,
452
+ parseGuardDescription,
453
+ parsePlanMarkdown,
454
+ parseWorldMarkdown,
455
+ readAuditLog,
456
+ renderDecisionFlow,
457
+ renderExplainText,
458
+ renderImpactReport,
459
+ renderImproveText,
460
+ renderSimulateText,
461
+ resolveProvider,
462
+ resolveWorldPath,
463
+ runInteractiveMode,
464
+ runPipeMode,
465
+ setActiveWorld,
466
+ simulateWorld,
467
+ summarizeAuditEvents,
468
+ tickAgentStates,
469
+ validateWorld,
470
+ verdictToAuditEvent,
471
+ writeTempWorld
472
+ };