monomind 1.11.11 → 1.11.13

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 (227) hide show
  1. package/.claude/commands/mastermind/idea.md +1 -1
  2. package/.claude/commands/mastermind/master.md +1 -1
  3. package/.claude/skills/mastermind/_protocol.md +4 -4
  4. package/.claude/skills/mastermind/architect.md +7 -4
  5. package/.claude/skills/mastermind/autodev.md +4 -2
  6. package/.claude/skills/mastermind/build.md +3 -3
  7. package/.claude/skills/mastermind/content.md +3 -3
  8. package/.claude/skills/mastermind/createorg.md +2 -2
  9. package/.claude/skills/mastermind/finance.md +3 -3
  10. package/.claude/skills/mastermind/idea.md +8 -0
  11. package/.claude/skills/mastermind/marketing.md +3 -3
  12. package/.claude/skills/mastermind/ops.md +3 -3
  13. package/.claude/skills/mastermind/release.md +3 -3
  14. package/.claude/skills/mastermind/research.md +3 -3
  15. package/.claude/skills/mastermind/review.md +3 -3
  16. package/.claude/skills/mastermind/sales.md +3 -3
  17. package/package.json +1 -1
  18. package/packages/@monomind/cli/dist/src/index.js +19 -14
  19. package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -3
  20. package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +1 -1
  21. package/packages/@monomind/cli/dist/src/update/checker.js +24 -7
  22. package/packages/@monomind/cli/dist/src/update/index.d.ts +10 -0
  23. package/packages/@monomind/cli/dist/src/update/index.js +29 -2
  24. package/packages/@monomind/cli/package.json +1 -1
  25. package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +0 -25
  26. package/packages/@monomind/cli/dist/src/agents/halt-signal.js +0 -76
  27. package/packages/@monomind/cli/dist/src/agents/index.d.ts +0 -18
  28. package/packages/@monomind/cli/dist/src/agents/index.js +0 -13
  29. package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +0 -41
  30. package/packages/@monomind/cli/dist/src/agents/managed-agent.js +0 -69
  31. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +0 -23
  32. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +0 -49
  33. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +0 -22
  34. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +0 -80
  35. package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +0 -71
  36. package/packages/@monomind/cli/dist/src/agents/registry-query.js +0 -125
  37. package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +0 -19
  38. package/packages/@monomind/cli/dist/src/agents/score-decay.js +0 -22
  39. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +0 -13
  40. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +0 -40
  41. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +0 -54
  42. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +0 -212
  43. package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +0 -30
  44. package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +0 -84
  45. package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +0 -20
  46. package/packages/@monomind/cli/dist/src/agents/trigger-index.js +0 -38
  47. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +0 -64
  48. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +0 -308
  49. package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +0 -18
  50. package/packages/@monomind/cli/dist/src/agents/version-diff.js +0 -64
  51. package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +0 -60
  52. package/packages/@monomind/cli/dist/src/agents/version-store.js +0 -235
  53. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -45
  54. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +0 -404
  55. package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +0 -14
  56. package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +0 -333
  57. package/packages/@monomind/cli/dist/src/commands/ui.js +0 -68
  58. package/packages/@monomind/cli/dist/src/consensus/index.d.ts +0 -7
  59. package/packages/@monomind/cli/dist/src/consensus/index.js +0 -6
  60. package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +0 -44
  61. package/packages/@monomind/cli/dist/src/context/context-provider.js +0 -25
  62. package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +0 -12
  63. package/packages/@monomind/cli/dist/src/context/git-state-provider.js +0 -34
  64. package/packages/@monomind/cli/dist/src/context/index.d.ts +0 -12
  65. package/packages/@monomind/cli/dist/src/context/index.js +0 -12
  66. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +0 -15
  67. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +0 -19
  68. package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +0 -26
  69. package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +0 -93
  70. package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +0 -24
  71. package/packages/@monomind/cli/dist/src/context/task-history-provider.js +0 -32
  72. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +0 -14
  73. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +0 -27
  74. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +0 -31
  75. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +0 -81
  76. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +0 -24
  77. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +0 -65
  78. package/packages/@monomind/cli/dist/src/dlq/index.d.ts +0 -10
  79. package/packages/@monomind/cli/dist/src/dlq/index.js +0 -7
  80. package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +0 -33
  81. package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +0 -107
  82. package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +0 -23
  83. package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +0 -59
  84. package/packages/@monomind/cli/dist/src/eval/index.d.ts +0 -10
  85. package/packages/@monomind/cli/dist/src/eval/index.js +0 -7
  86. package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +0 -40
  87. package/packages/@monomind/cli/dist/src/eval/trace-collector.js +0 -102
  88. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
  89. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +0 -264
  90. package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +0 -22
  91. package/packages/@monomind/cli/dist/src/interactive/interrupt.js +0 -71
  92. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +0 -25
  93. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +0 -48
  94. package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +0 -61
  95. package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +0 -246
  96. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +0 -9
  97. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +0 -230
  98. package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +0 -21
  99. package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +0 -106
  100. package/packages/@monomind/cli/dist/src/model/index.d.ts +0 -4
  101. package/packages/@monomind/cli/dist/src/model/index.js +0 -4
  102. package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +0 -22
  103. package/packages/@monomind/cli/dist/src/model/model-settings.js +0 -33
  104. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +0 -24
  105. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +0 -65
  106. package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +0 -34
  107. package/packages/@monomind/cli/dist/src/monovector/capabilities.js +0 -37
  108. package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +0 -7
  109. package/packages/@monomind/cli/dist/src/orchestration/index.js +0 -6
  110. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +0 -11
  111. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +0 -31
  112. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +0 -68
  113. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +0 -180
  114. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
  115. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
  116. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
  117. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
  118. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
  119. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
  120. package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +0 -60
  121. package/packages/@monomind/cli/dist/src/runtime/headless.js +0 -284
  122. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.d.ts +0 -50
  123. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +0 -95
  124. package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +0 -197
  125. package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +0 -623
  126. package/packages/@monomind/cli/dist/src/services/index.d.ts +0 -13
  127. package/packages/@monomind/cli/dist/src/services/index.js +0 -11
  128. package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +0 -201
  129. package/packages/@monomind/cli/dist/src/services/worker-queue.js +0 -594
  130. package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +0 -25
  131. package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +0 -77
  132. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +0 -31
  133. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +0 -61
  134. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +0 -19
  135. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +0 -68
  136. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +0 -13
  137. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +0 -205
  138. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
  139. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +0 -190
  140. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +0 -6
  141. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +0 -105
  142. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +0 -7
  143. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +0 -214
  144. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +0 -10
  145. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +0 -82
  146. package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +0 -12
  147. package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +0 -23
  148. package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +0 -17
  149. package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +0 -129
  150. package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +0 -9
  151. package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +0 -116
  152. package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +0 -41
  153. package/packages/@monomind/cli/dist/src/workflow/dag-types.js +0 -8
  154. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +0 -12
  155. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +0 -20
  156. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +0 -165
  157. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +0 -82
  158. package/packages/@monomind/cli/dist/src/workflow/index.d.ts +0 -13
  159. package/packages/@monomind/cli/dist/src/workflow/index.js +0 -11
  160. package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +0 -11
  161. package/packages/@monomind/cli/dist/src/workflow/template-engine.js +0 -40
  162. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +0 -29
  163. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +0 -227
  164. package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
  165. package/packages/@monomind/guidance/dist/adversarial.js +0 -572
  166. package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
  167. package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
  168. package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
  169. package/packages/@monomind/guidance/dist/artifacts.js +0 -356
  170. package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
  171. package/packages/@monomind/guidance/dist/authority.js +0 -558
  172. package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
  173. package/packages/@monomind/guidance/dist/capabilities.js +0 -485
  174. package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
  175. package/packages/@monomind/guidance/dist/coherence.js +0 -372
  176. package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
  177. package/packages/@monomind/guidance/dist/compiler.js +0 -419
  178. package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
  179. package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
  180. package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
  181. package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
  182. package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
  183. package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
  184. package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
  185. package/packages/@monomind/guidance/dist/evolution.js +0 -500
  186. package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
  187. package/packages/@monomind/guidance/dist/gates.js +0 -302
  188. package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
  189. package/packages/@monomind/guidance/dist/gateway.js +0 -452
  190. package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
  191. package/packages/@monomind/guidance/dist/generators.js +0 -682
  192. package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
  193. package/packages/@monomind/guidance/dist/headless.js +0 -342
  194. package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
  195. package/packages/@monomind/guidance/dist/hooks.js +0 -347
  196. package/packages/@monomind/guidance/dist/index.d.ts +0 -205
  197. package/packages/@monomind/guidance/dist/index.js +0 -321
  198. package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
  199. package/packages/@monomind/guidance/dist/ledger.js +0 -375
  200. package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
  201. package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
  202. package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
  203. package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
  204. package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
  205. package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
  206. package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
  207. package/packages/@monomind/guidance/dist/optimizer.js +0 -329
  208. package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
  209. package/packages/@monomind/guidance/dist/persistence.js +0 -464
  210. package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
  211. package/packages/@monomind/guidance/dist/proof.js +0 -238
  212. package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
  213. package/packages/@monomind/guidance/dist/retriever.js +0 -394
  214. package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
  215. package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
  216. package/packages/@monomind/guidance/dist/temporal.d.ts +0 -426
  217. package/packages/@monomind/guidance/dist/temporal.js +0 -658
  218. package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
  219. package/packages/@monomind/guidance/dist/trust.js +0 -473
  220. package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
  221. package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
  222. package/packages/@monomind/guidance/dist/types.d.ts +0 -378
  223. package/packages/@monomind/guidance/dist/types.js +0 -10
  224. package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
  225. package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
  226. package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
  227. package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
@@ -1,370 +0,0 @@
1
- /**
2
- * RuvBot Integration Bridge
3
- *
4
- * Bridges ruvbot (npm: ruvbot@0.1.8) with the @monomind/guidance control
5
- * plane. Wires ruvbot events to guidance hooks, wraps AIDefence as an
6
- * enforcement gate, governs memory operations, and feeds trust accumulation.
7
- *
8
- * ruvbot is an optional peer dependency. All types and classes are exported
9
- * regardless of whether ruvbot is installed. Runtime calls that require the
10
- * ruvbot package will throw a clear error if the package is missing.
11
- *
12
- * Components:
13
- * 1. RuvBotGuidanceBridge - Event wiring, gate delegation, trust tracking
14
- * 2. AIDefenceGate - Prompt injection, jailbreak, PII detection gate
15
- * 3. RuvBotMemoryAdapter - Governed memory read/write with proof logging
16
- *
17
- * @module @monomind/guidance/ruvbot-integration
18
- */
19
- import type { GateResult } from './types.js';
20
- import type { MemoryAuthority, MemoryEntry, WriteDecision } from './memory-gate.js';
21
- /**
22
- * Minimal interface for a ruvbot instance. Mirrors the event-emitter surface
23
- * exposed by `createRuvBot()` without importing the package at compile time.
24
- */
25
- export interface RuvBotInstance {
26
- on(event: string, handler: (...args: unknown[]) => void): void;
27
- off(event: string, handler: (...args: unknown[]) => void): void;
28
- emit?(event: string, ...args: unknown[]): void;
29
- }
30
- /**
31
- * Minimal interface for ruvbot's AIDefence guard returned by
32
- * `createAIDefenceGuard()`.
33
- */
34
- export interface RuvBotAIDefenceGuard {
35
- check(input: string): Promise<{
36
- safe: boolean;
37
- threats: Array<{
38
- type: string;
39
- severity: string;
40
- detail: string;
41
- }>;
42
- sanitizedInput?: string;
43
- }>;
44
- }
45
- /**
46
- * Minimal interface for ruvbot's memory subsystem.
47
- */
48
- export interface RuvBotMemory {
49
- read(key: string, namespace?: string): Promise<unknown>;
50
- write(key: string, value: unknown, namespace?: string): Promise<void>;
51
- delete?(key: string, namespace?: string): Promise<void>;
52
- search?(query: string, options?: Record<string, unknown>): Promise<unknown[]>;
53
- }
54
- /**
55
- * Threat detected by the AIDefence layer.
56
- */
57
- export interface AIDefenceThreat {
58
- type: 'prompt-injection' | 'jailbreak' | 'pii' | 'control-chars' | 'homoglyph';
59
- severity: 'low' | 'medium' | 'high' | 'critical';
60
- detail: string;
61
- }
62
- /**
63
- * Result of an AIDefence evaluation.
64
- */
65
- export interface AIDefenceResult {
66
- safe: boolean;
67
- threats: AIDefenceThreat[];
68
- sanitizedInput?: string;
69
- latencyMs: number;
70
- }
71
- /**
72
- * Configuration for the AIDefenceGate.
73
- */
74
- export interface AIDefenceGateConfig {
75
- detectPromptInjection: boolean;
76
- detectJailbreak: boolean;
77
- detectPII: boolean;
78
- blockThreshold: 'low' | 'medium' | 'high';
79
- }
80
- /**
81
- * Configuration for the RuvBotGuidanceBridge.
82
- */
83
- export interface RuvBotBridgeConfig {
84
- enableAIDefence: boolean;
85
- enableMemoryGovernance: boolean;
86
- enableTrustTracking: boolean;
87
- enableProofChain: boolean;
88
- /** HMAC signing key for proof chains. Required when enableProofChain is true. */
89
- proofSigningKey?: string;
90
- }
91
- /**
92
- * A normalized ruvbot event for internal processing.
93
- */
94
- export interface RuvBotEvent {
95
- type: string;
96
- timestamp: number;
97
- sessionId?: string;
98
- agentId?: string;
99
- data: Record<string, unknown>;
100
- }
101
- /**
102
- * Wraps ruvbot's 6-layer AIDefence as an enforcement gate compatible with the
103
- * guidance control plane's GateResult / GateDecision interface.
104
- *
105
- * Supports:
106
- * - Prompt injection detection
107
- * - Jailbreak detection
108
- * - PII detection
109
- * - Control character and homoglyph detection (via ruvbot internals)
110
- * - Configurable sensitivity / block threshold
111
- *
112
- * Evaluates both input (pre-processing) and output (post-processing) text.
113
- */
114
- export declare class AIDefenceGate {
115
- private config;
116
- private guard;
117
- private guardInitPromise;
118
- constructor(config?: Partial<AIDefenceGateConfig>);
119
- /**
120
- * Lazily initialize the underlying ruvbot AIDefence guard.
121
- * Safe to call multiple times; only the first call creates the guard.
122
- */
123
- private ensureGuard;
124
- /**
125
- * Evaluate input text for threats (pre-processing gate).
126
- *
127
- * Checks for prompt injection, jailbreak attempts, and PII based
128
- * on the configured sensitivity.
129
- */
130
- evaluateInput(input: string): Promise<AIDefenceResult>;
131
- /**
132
- * Evaluate output text for threats (post-processing gate).
133
- *
134
- * Primarily checks for PII leakage and secret exposure in responses.
135
- */
136
- evaluateOutput(output: string): Promise<AIDefenceResult>;
137
- /**
138
- * Convert an AIDefenceResult into a GateResult compatible with the
139
- * guidance enforcement pipeline.
140
- *
141
- * Decision logic:
142
- * - If no threats: 'allow'
143
- * - If threats above block threshold: 'block'
144
- * - Otherwise: 'warn'
145
- */
146
- toGateResult(result: AIDefenceResult, context?: string): GateResult;
147
- /**
148
- * Get the current configuration.
149
- */
150
- getConfig(): AIDefenceGateConfig;
151
- /**
152
- * Update configuration. Resets the guard so the next evaluation
153
- * re-initializes with the new settings.
154
- */
155
- updateConfig(config: Partial<AIDefenceGateConfig>): void;
156
- private normalizeThreats;
157
- private buildRemediation;
158
- }
159
- /**
160
- * Wraps ruvbot's memory read/write operations with guidance control plane
161
- * governance. Every write passes through the MemoryWriteGate for authority
162
- * and coherence checks. All operations are logged to a proof chain.
163
- */
164
- export declare class RuvBotMemoryAdapter {
165
- private readonly memoryGate;
166
- private readonly coherenceScheduler;
167
- private proofChain;
168
- private ruvbotMemory;
169
- private operationLog;
170
- constructor(memoryGate: import('./memory-gate.js').MemoryWriteGate, coherenceScheduler: import('./coherence.js').CoherenceScheduler);
171
- /**
172
- * Attach a ruvbot memory instance for proxied operations.
173
- */
174
- attachMemory(memory: RuvBotMemory): void;
175
- /**
176
- * Attach a proof chain for operation logging.
177
- */
178
- attachProofChain(proofChain: import('./proof.js').ProofChain): void;
179
- /**
180
- * Governed read: reads through ruvbot memory, logs to proof chain.
181
- */
182
- read(key: string, namespace?: string): Promise<unknown>;
183
- /**
184
- * Governed write: runs through MemoryWriteGate, checks coherence,
185
- * logs to proof chain, then delegates to ruvbot memory.
186
- *
187
- * Returns the WriteDecision. If denied, the write is not performed.
188
- */
189
- write(key: string, namespace: string, value: unknown, authority: MemoryAuthority, existingEntries?: MemoryEntry[]): Promise<WriteDecision>;
190
- /**
191
- * Governed delete: checks authority, logs, then delegates.
192
- */
193
- delete(key: string, namespace: string, authority: MemoryAuthority): Promise<{
194
- allowed: boolean;
195
- reason: string;
196
- }>;
197
- /**
198
- * Get the operation log for audit/proof purposes.
199
- */
200
- getOperationLog(): ReadonlyArray<{
201
- operation: 'read' | 'write' | 'delete';
202
- key: string;
203
- namespace: string;
204
- timestamp: number;
205
- decision?: WriteDecision;
206
- }>;
207
- /**
208
- * Get the count of governed operations.
209
- */
210
- get operationCount(): number;
211
- /**
212
- * Clear the operation log.
213
- */
214
- clearLog(): void;
215
- private ensureMemoryAttached;
216
- }
217
- /**
218
- * Bridges a ruvbot instance with the @monomind/guidance control plane.
219
- *
220
- * Wires ruvbot event hooks to guidance enforcement and trust systems:
221
- *
222
- * - `message` -> EnforcementGates (secrets, destructive ops) + AIDefence
223
- * - `agent:spawn` -> ManifestValidator
224
- * - `session:create` -> ProofChain initialization
225
- * - `session:end` -> ProofChain finalization and ledger persistence
226
- * - `ready` -> Trust accumulator initialization
227
- * - `error` -> Trust 'deny' outcome recording
228
- *
229
- * All gate outcomes are fed into the TrustAccumulator so that ruvbot agents
230
- * build (or lose) trust over time.
231
- */
232
- export declare class RuvBotGuidanceBridge {
233
- private readonly config;
234
- private ruvbot;
235
- private gates;
236
- private manifestValidator;
237
- private trustSystem;
238
- private aiDefenceGate;
239
- private memoryAdapter;
240
- private sessionChains;
241
- private boundHandlers;
242
- private eventLog;
243
- private static readonly MAX_EVENT_LOG;
244
- constructor(config?: Partial<RuvBotBridgeConfig>);
245
- /**
246
- * Attach guidance control plane components.
247
- *
248
- * Accepts either a full GuidanceControlPlane instance (from which
249
- * sub-components are extracted) or individual components.
250
- */
251
- attachGuidance(components: {
252
- gates?: import('./gates.js').EnforcementGates;
253
- manifestValidator?: import('./manifest-validator.js').ManifestValidator;
254
- trustSystem?: import('./trust.js').TrustSystem;
255
- aiDefenceGate?: AIDefenceGate;
256
- memoryAdapter?: RuvBotMemoryAdapter;
257
- }): void;
258
- /**
259
- * Connect to a ruvbot instance and wire all event handlers.
260
- *
261
- * This is the primary entry point. Once called, the bridge will
262
- * intercept ruvbot events and route them through guidance gates.
263
- */
264
- connect(ruvbot: RuvBotInstance): void;
265
- /**
266
- * Disconnect from the ruvbot instance, removing all event handlers.
267
- */
268
- disconnect(): void;
269
- /**
270
- * Evaluate a ruvbot AIDefence result and return a GateResult-compatible
271
- * decision. Can be called independently of event wiring.
272
- */
273
- evaluateAIDefence(input: string): Promise<GateResult>;
274
- /**
275
- * Get the proof chain for a specific session.
276
- */
277
- getSessionProofChain(sessionId: string): import('./proof.js').ProofChain | undefined;
278
- /**
279
- * Get all active session IDs.
280
- */
281
- getActiveSessionIds(): string[];
282
- /**
283
- * Get the event log for diagnostics.
284
- */
285
- getEventLog(): ReadonlyArray<RuvBotEvent>;
286
- /**
287
- * Get the current bridge configuration.
288
- */
289
- getConfig(): RuvBotBridgeConfig;
290
- /**
291
- * Whether the bridge is currently connected to a ruvbot instance.
292
- */
293
- get connected(): boolean;
294
- /**
295
- * Handle `message` events: run content through enforcement gates
296
- * and optionally through AIDefence.
297
- */
298
- private handleMessage;
299
- /**
300
- * Handle `agent:spawn` events: validate agent manifest.
301
- */
302
- private handleAgentSpawn;
303
- /**
304
- * Handle `session:create` events: initialize a proof chain for the session.
305
- */
306
- private handleSessionCreate;
307
- /**
308
- * Handle `session:end` events: finalize the proof chain and persist.
309
- */
310
- private handleSessionEnd;
311
- /**
312
- * Handle `ready` events: log bridge activation.
313
- */
314
- private handleReady;
315
- /**
316
- * Handle `shutdown` events: clean up all session proof chains.
317
- */
318
- private handleShutdown;
319
- /**
320
- * Handle `error` events: record a deny outcome in trust tracking.
321
- */
322
- private handleError;
323
- /**
324
- * Handle `agent:stop` events: record final trust snapshot.
325
- */
326
- private handleAgentStop;
327
- private wireEvent;
328
- private logEvent;
329
- }
330
- /**
331
- * Create a fully wired RuvBotGuidanceBridge.
332
- *
333
- * Connects the bridge to a ruvbot instance and attaches the guidance
334
- * control plane components. The bridge immediately begins intercepting
335
- * ruvbot events.
336
- *
337
- * @param ruvbotInstance - A ruvbot instance (from createRuvBot())
338
- * @param guidancePlane - A GuidanceControlPlane or individual components
339
- * @param config - Optional bridge configuration
340
- * @returns The connected RuvBotGuidanceBridge
341
- */
342
- export declare function createRuvBotBridge(ruvbotInstance: RuvBotInstance, guidancePlane: {
343
- gates?: import('./gates.js').EnforcementGates;
344
- manifestValidator?: import('./manifest-validator.js').ManifestValidator;
345
- trustSystem?: import('./trust.js').TrustSystem;
346
- aiDefenceGate?: AIDefenceGate;
347
- memoryAdapter?: RuvBotMemoryAdapter;
348
- }, config?: Partial<RuvBotBridgeConfig>): RuvBotGuidanceBridge;
349
- /**
350
- * Create an AIDefenceGate with optional configuration.
351
- *
352
- * The gate lazily initializes the underlying ruvbot AIDefence guard
353
- * on the first evaluation call.
354
- *
355
- * @param config - Optional gate configuration
356
- * @returns A new AIDefenceGate instance
357
- */
358
- export declare function createAIDefenceGate(config?: Partial<AIDefenceGateConfig>): AIDefenceGate;
359
- /**
360
- * Create a RuvBotMemoryAdapter with governance components.
361
- *
362
- * The adapter wraps ruvbot memory operations with MemoryWriteGate authority
363
- * checks and CoherenceScheduler tracking.
364
- *
365
- * @param memoryGate - The MemoryWriteGate for authority/rate/contradiction checks
366
- * @param coherenceScheduler - The CoherenceScheduler for drift tracking
367
- * @returns A new RuvBotMemoryAdapter instance
368
- */
369
- export declare function createRuvBotMemoryAdapter(memoryGate: import('./memory-gate.js').MemoryWriteGate, coherenceScheduler: import('./coherence.js').CoherenceScheduler): RuvBotMemoryAdapter;
370
- //# sourceMappingURL=ruvbot-integration.d.ts.map