@iflow-mcp/jkheadley-instar 0.26.2

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 (1671) hide show
  1. package/.claude/hooks/free-text-guard.sh +117 -0
  2. package/.claude/settings.json +201 -0
  3. package/.claude/skills/autonomous/hooks/autonomous-stop-hook.sh +234 -0
  4. package/.claude/skills/autonomous/hooks/hooks.json +15 -0
  5. package/.claude/skills/autonomous/scripts/setup-autonomous.sh +166 -0
  6. package/.claude/skills/autonomous/skill.md +254 -0
  7. package/.claude/skills/secret-setup/skill.md +210 -0
  8. package/.claude/skills/setup-wizard/skill.md +2132 -0
  9. package/LICENSE +21 -0
  10. package/README.md +214 -0
  11. package/dashboard/favicon.png +0 -0
  12. package/dashboard/index.html +5740 -0
  13. package/dashboard/logo.png +0 -0
  14. package/dist/cli.d.ts +21 -0
  15. package/dist/cli.d.ts.map +1 -0
  16. package/dist/cli.js +1782 -0
  17. package/dist/cli.js.map +1 -0
  18. package/dist/commands/backup.d.ts +16 -0
  19. package/dist/commands/backup.d.ts.map +1 -0
  20. package/dist/commands/backup.js +84 -0
  21. package/dist/commands/backup.js.map +1 -0
  22. package/dist/commands/discovery.d.ts +158 -0
  23. package/dist/commands/discovery.d.ts.map +1 -0
  24. package/dist/commands/discovery.js +532 -0
  25. package/dist/commands/discovery.js.map +1 -0
  26. package/dist/commands/git.d.ts +25 -0
  27. package/dist/commands/git.d.ts.map +1 -0
  28. package/dist/commands/git.js +152 -0
  29. package/dist/commands/git.js.map +1 -0
  30. package/dist/commands/init.d.ts +52 -0
  31. package/dist/commands/init.d.ts.map +1 -0
  32. package/dist/commands/init.js +4211 -0
  33. package/dist/commands/init.js.map +1 -0
  34. package/dist/commands/intent.d.ts +30 -0
  35. package/dist/commands/intent.d.ts.map +1 -0
  36. package/dist/commands/intent.js +349 -0
  37. package/dist/commands/intent.js.map +1 -0
  38. package/dist/commands/job.d.ts +42 -0
  39. package/dist/commands/job.d.ts.map +1 -0
  40. package/dist/commands/job.js +202 -0
  41. package/dist/commands/job.js.map +1 -0
  42. package/dist/commands/knowledge.d.ts +25 -0
  43. package/dist/commands/knowledge.d.ts.map +1 -0
  44. package/dist/commands/knowledge.js +127 -0
  45. package/dist/commands/knowledge.js.map +1 -0
  46. package/dist/commands/machine.d.ts +53 -0
  47. package/dist/commands/machine.d.ts.map +1 -0
  48. package/dist/commands/machine.js +680 -0
  49. package/dist/commands/machine.js.map +1 -0
  50. package/dist/commands/memory.d.ts +24 -0
  51. package/dist/commands/memory.d.ts.map +1 -0
  52. package/dist/commands/memory.js +163 -0
  53. package/dist/commands/memory.js.map +1 -0
  54. package/dist/commands/nuke.d.ts +22 -0
  55. package/dist/commands/nuke.d.ts.map +1 -0
  56. package/dist/commands/nuke.js +216 -0
  57. package/dist/commands/nuke.js.map +1 -0
  58. package/dist/commands/org.d.ts +16 -0
  59. package/dist/commands/org.d.ts.map +1 -0
  60. package/dist/commands/org.js +69 -0
  61. package/dist/commands/org.js.map +1 -0
  62. package/dist/commands/playbook.d.ts +91 -0
  63. package/dist/commands/playbook.d.ts.map +1 -0
  64. package/dist/commands/playbook.js +1016 -0
  65. package/dist/commands/playbook.js.map +1 -0
  66. package/dist/commands/reflect.d.ts +52 -0
  67. package/dist/commands/reflect.d.ts.map +1 -0
  68. package/dist/commands/reflect.js +316 -0
  69. package/dist/commands/reflect.js.map +1 -0
  70. package/dist/commands/relationship.d.ts +17 -0
  71. package/dist/commands/relationship.d.ts.map +1 -0
  72. package/dist/commands/relationship.js +156 -0
  73. package/dist/commands/relationship.js.map +1 -0
  74. package/dist/commands/relay.d.ts +26 -0
  75. package/dist/commands/relay.d.ts.map +1 -0
  76. package/dist/commands/relay.js +121 -0
  77. package/dist/commands/relay.js.map +1 -0
  78. package/dist/commands/review.d.ts +18 -0
  79. package/dist/commands/review.d.ts.map +1 -0
  80. package/dist/commands/review.js +193 -0
  81. package/dist/commands/review.js.map +1 -0
  82. package/dist/commands/semantic.d.ts +37 -0
  83. package/dist/commands/semantic.d.ts.map +1 -0
  84. package/dist/commands/semantic.js +198 -0
  85. package/dist/commands/semantic.js.map +1 -0
  86. package/dist/commands/server.d.ts +37 -0
  87. package/dist/commands/server.d.ts.map +1 -0
  88. package/dist/commands/server.js +4875 -0
  89. package/dist/commands/server.js.map +1 -0
  90. package/dist/commands/setup.d.ts +63 -0
  91. package/dist/commands/setup.d.ts.map +1 -0
  92. package/dist/commands/setup.js +1235 -0
  93. package/dist/commands/setup.js.map +1 -0
  94. package/dist/commands/slack-cli.d.ts +16 -0
  95. package/dist/commands/slack-cli.d.ts.map +1 -0
  96. package/dist/commands/slack-cli.js +259 -0
  97. package/dist/commands/slack-cli.js.map +1 -0
  98. package/dist/commands/status.d.ts +11 -0
  99. package/dist/commands/status.d.ts.map +1 -0
  100. package/dist/commands/status.js +120 -0
  101. package/dist/commands/status.js.map +1 -0
  102. package/dist/commands/user.d.ts +17 -0
  103. package/dist/commands/user.d.ts.map +1 -0
  104. package/dist/commands/user.js +53 -0
  105. package/dist/commands/user.js.map +1 -0
  106. package/dist/commands/whatsapp.d.ts +31 -0
  107. package/dist/commands/whatsapp.d.ts.map +1 -0
  108. package/dist/commands/whatsapp.js +408 -0
  109. package/dist/commands/whatsapp.js.map +1 -0
  110. package/dist/config/ConfigDefaults.d.ts +40 -0
  111. package/dist/config/ConfigDefaults.d.ts.map +1 -0
  112. package/dist/config/ConfigDefaults.js +175 -0
  113. package/dist/config/ConfigDefaults.js.map +1 -0
  114. package/dist/config/LiveConfig.d.ts +97 -0
  115. package/dist/config/LiveConfig.d.ts.map +1 -0
  116. package/dist/config/LiveConfig.js +220 -0
  117. package/dist/config/LiveConfig.js.map +1 -0
  118. package/dist/core/AccessControl.d.ts +91 -0
  119. package/dist/core/AccessControl.d.ts.map +1 -0
  120. package/dist/core/AccessControl.js +184 -0
  121. package/dist/core/AccessControl.js.map +1 -0
  122. package/dist/core/AdaptationValidator.d.ts +44 -0
  123. package/dist/core/AdaptationValidator.d.ts.map +1 -0
  124. package/dist/core/AdaptationValidator.js +132 -0
  125. package/dist/core/AdaptationValidator.js.map +1 -0
  126. package/dist/core/AdaptiveTrust.d.ts +188 -0
  127. package/dist/core/AdaptiveTrust.d.ts.map +1 -0
  128. package/dist/core/AdaptiveTrust.js +354 -0
  129. package/dist/core/AdaptiveTrust.js.map +1 -0
  130. package/dist/core/AgentBus.d.ts +168 -0
  131. package/dist/core/AgentBus.d.ts.map +1 -0
  132. package/dist/core/AgentBus.js +369 -0
  133. package/dist/core/AgentBus.js.map +1 -0
  134. package/dist/core/AgentConnector.d.ts +76 -0
  135. package/dist/core/AgentConnector.d.ts.map +1 -0
  136. package/dist/core/AgentConnector.js +324 -0
  137. package/dist/core/AgentConnector.js.map +1 -0
  138. package/dist/core/AgentRegistry.d.ts +107 -0
  139. package/dist/core/AgentRegistry.d.ts.map +1 -0
  140. package/dist/core/AgentRegistry.js +569 -0
  141. package/dist/core/AgentRegistry.js.map +1 -0
  142. package/dist/core/AnthropicIntelligenceProvider.d.ts +24 -0
  143. package/dist/core/AnthropicIntelligenceProvider.d.ts.map +1 -0
  144. package/dist/core/AnthropicIntelligenceProvider.js +63 -0
  145. package/dist/core/AnthropicIntelligenceProvider.js.map +1 -0
  146. package/dist/core/AuditTrail.d.ts +207 -0
  147. package/dist/core/AuditTrail.d.ts.map +1 -0
  148. package/dist/core/AuditTrail.js +271 -0
  149. package/dist/core/AuditTrail.js.map +1 -0
  150. package/dist/core/AutoApprover.d.ts +63 -0
  151. package/dist/core/AutoApprover.d.ts.map +1 -0
  152. package/dist/core/AutoApprover.js +151 -0
  153. package/dist/core/AutoApprover.js.map +1 -0
  154. package/dist/core/AutoDispatcher.d.ts +170 -0
  155. package/dist/core/AutoDispatcher.d.ts.map +1 -0
  156. package/dist/core/AutoDispatcher.js +647 -0
  157. package/dist/core/AutoDispatcher.js.map +1 -0
  158. package/dist/core/AutoUpdater.d.ts +193 -0
  159. package/dist/core/AutoUpdater.d.ts.map +1 -0
  160. package/dist/core/AutoUpdater.js +648 -0
  161. package/dist/core/AutoUpdater.js.map +1 -0
  162. package/dist/core/AutonomousEvolution.d.ts +168 -0
  163. package/dist/core/AutonomousEvolution.d.ts.map +1 -0
  164. package/dist/core/AutonomousEvolution.js +384 -0
  165. package/dist/core/AutonomousEvolution.js.map +1 -0
  166. package/dist/core/AutonomyProfileManager.d.ts +108 -0
  167. package/dist/core/AutonomyProfileManager.d.ts.map +1 -0
  168. package/dist/core/AutonomyProfileManager.js +323 -0
  169. package/dist/core/AutonomyProfileManager.js.map +1 -0
  170. package/dist/core/AutonomySkill.d.ts +98 -0
  171. package/dist/core/AutonomySkill.d.ts.map +1 -0
  172. package/dist/core/AutonomySkill.js +497 -0
  173. package/dist/core/AutonomySkill.js.map +1 -0
  174. package/dist/core/BackupManager.d.ts +66 -0
  175. package/dist/core/BackupManager.d.ts.map +1 -0
  176. package/dist/core/BackupManager.js +266 -0
  177. package/dist/core/BackupManager.js.map +1 -0
  178. package/dist/core/BitwardenProvider.d.ts +85 -0
  179. package/dist/core/BitwardenProvider.d.ts.map +1 -0
  180. package/dist/core/BitwardenProvider.js +437 -0
  181. package/dist/core/BitwardenProvider.js.map +1 -0
  182. package/dist/core/BlockerLearningLoop.d.ts +99 -0
  183. package/dist/core/BlockerLearningLoop.d.ts.map +1 -0
  184. package/dist/core/BlockerLearningLoop.js +205 -0
  185. package/dist/core/BlockerLearningLoop.js.map +1 -0
  186. package/dist/core/BranchManager.d.ts +165 -0
  187. package/dist/core/BranchManager.d.ts.map +1 -0
  188. package/dist/core/BranchManager.js +413 -0
  189. package/dist/core/BranchManager.js.map +1 -0
  190. package/dist/core/CaffeinateManager.d.ts +50 -0
  191. package/dist/core/CaffeinateManager.d.ts.map +1 -0
  192. package/dist/core/CaffeinateManager.js +189 -0
  193. package/dist/core/CaffeinateManager.js.map +1 -0
  194. package/dist/core/CallbackRegistry.d.ts +67 -0
  195. package/dist/core/CallbackRegistry.d.ts.map +1 -0
  196. package/dist/core/CallbackRegistry.js +145 -0
  197. package/dist/core/CallbackRegistry.js.map +1 -0
  198. package/dist/core/CanonicalState.d.ts +132 -0
  199. package/dist/core/CanonicalState.d.ts.map +1 -0
  200. package/dist/core/CanonicalState.js +297 -0
  201. package/dist/core/CanonicalState.js.map +1 -0
  202. package/dist/core/CapabilityMapper.d.ts +192 -0
  203. package/dist/core/CapabilityMapper.d.ts.map +1 -0
  204. package/dist/core/CapabilityMapper.js +958 -0
  205. package/dist/core/CapabilityMapper.js.map +1 -0
  206. package/dist/core/CapabilityRegistryGenerator.d.ts +72 -0
  207. package/dist/core/CapabilityRegistryGenerator.d.ts.map +1 -0
  208. package/dist/core/CapabilityRegistryGenerator.js +310 -0
  209. package/dist/core/CapabilityRegistryGenerator.js.map +1 -0
  210. package/dist/core/ClaudeCliIntelligenceProvider.d.ts +21 -0
  211. package/dist/core/ClaudeCliIntelligenceProvider.d.ts.map +1 -0
  212. package/dist/core/ClaudeCliIntelligenceProvider.js +60 -0
  213. package/dist/core/ClaudeCliIntelligenceProvider.js.map +1 -0
  214. package/dist/core/CoherenceGate.d.ts +198 -0
  215. package/dist/core/CoherenceGate.d.ts.map +1 -0
  216. package/dist/core/CoherenceGate.js +986 -0
  217. package/dist/core/CoherenceGate.js.map +1 -0
  218. package/dist/core/CoherenceReviewer.d.ts +104 -0
  219. package/dist/core/CoherenceReviewer.d.ts.map +1 -0
  220. package/dist/core/CoherenceReviewer.js +185 -0
  221. package/dist/core/CoherenceReviewer.js.map +1 -0
  222. package/dist/core/Config.d.ts +32 -0
  223. package/dist/core/Config.d.ts.map +1 -0
  224. package/dist/core/Config.js +332 -0
  225. package/dist/core/Config.js.map +1 -0
  226. package/dist/core/ConflictNegotiator.d.ts +167 -0
  227. package/dist/core/ConflictNegotiator.d.ts.map +1 -0
  228. package/dist/core/ConflictNegotiator.js +280 -0
  229. package/dist/core/ConflictNegotiator.js.map +1 -0
  230. package/dist/core/ContextHierarchy.d.ts +102 -0
  231. package/dist/core/ContextHierarchy.d.ts.map +1 -0
  232. package/dist/core/ContextHierarchy.js +594 -0
  233. package/dist/core/ContextHierarchy.js.map +1 -0
  234. package/dist/core/ContextSnapshotBuilder.d.ts +80 -0
  235. package/dist/core/ContextSnapshotBuilder.d.ts.map +1 -0
  236. package/dist/core/ContextSnapshotBuilder.js +342 -0
  237. package/dist/core/ContextSnapshotBuilder.js.map +1 -0
  238. package/dist/core/ContextualEvaluator.d.ts +103 -0
  239. package/dist/core/ContextualEvaluator.d.ts.map +1 -0
  240. package/dist/core/ContextualEvaluator.js +389 -0
  241. package/dist/core/ContextualEvaluator.js.map +1 -0
  242. package/dist/core/ConvergenceChecker.d.ts +24 -0
  243. package/dist/core/ConvergenceChecker.d.ts.map +1 -0
  244. package/dist/core/ConvergenceChecker.js +113 -0
  245. package/dist/core/ConvergenceChecker.js.map +1 -0
  246. package/dist/core/CoordinationProtocol.d.ts +198 -0
  247. package/dist/core/CoordinationProtocol.d.ts.map +1 -0
  248. package/dist/core/CoordinationProtocol.js +363 -0
  249. package/dist/core/CoordinationProtocol.js.map +1 -0
  250. package/dist/core/CustomReviewerLoader.d.ts +45 -0
  251. package/dist/core/CustomReviewerLoader.d.ts.map +1 -0
  252. package/dist/core/CustomReviewerLoader.js +153 -0
  253. package/dist/core/CustomReviewerLoader.js.map +1 -0
  254. package/dist/core/DecisionJournal.d.ts +56 -0
  255. package/dist/core/DecisionJournal.d.ts.map +1 -0
  256. package/dist/core/DecisionJournal.js +132 -0
  257. package/dist/core/DecisionJournal.js.map +1 -0
  258. package/dist/core/DeferredDispatchTracker.d.ts +91 -0
  259. package/dist/core/DeferredDispatchTracker.d.ts.map +1 -0
  260. package/dist/core/DeferredDispatchTracker.js +213 -0
  261. package/dist/core/DeferredDispatchTracker.js.map +1 -0
  262. package/dist/core/DiscoveryEvaluator.d.ts +131 -0
  263. package/dist/core/DiscoveryEvaluator.d.ts.map +1 -0
  264. package/dist/core/DiscoveryEvaluator.js +377 -0
  265. package/dist/core/DiscoveryEvaluator.js.map +1 -0
  266. package/dist/core/DispatchDecisionJournal.d.ts +83 -0
  267. package/dist/core/DispatchDecisionJournal.d.ts.map +1 -0
  268. package/dist/core/DispatchDecisionJournal.js +181 -0
  269. package/dist/core/DispatchDecisionJournal.js.map +1 -0
  270. package/dist/core/DispatchExecutor.d.ts +127 -0
  271. package/dist/core/DispatchExecutor.d.ts.map +1 -0
  272. package/dist/core/DispatchExecutor.js +355 -0
  273. package/dist/core/DispatchExecutor.js.map +1 -0
  274. package/dist/core/DispatchManager.d.ts +200 -0
  275. package/dist/core/DispatchManager.d.ts.map +1 -0
  276. package/dist/core/DispatchManager.js +524 -0
  277. package/dist/core/DispatchManager.js.map +1 -0
  278. package/dist/core/DispatchScopeEnforcer.d.ts +57 -0
  279. package/dist/core/DispatchScopeEnforcer.d.ts.map +1 -0
  280. package/dist/core/DispatchScopeEnforcer.js +173 -0
  281. package/dist/core/DispatchScopeEnforcer.js.map +1 -0
  282. package/dist/core/DispatchVerifier.d.ts +76 -0
  283. package/dist/core/DispatchVerifier.d.ts.map +1 -0
  284. package/dist/core/DispatchVerifier.js +128 -0
  285. package/dist/core/DispatchVerifier.js.map +1 -0
  286. package/dist/core/EvolutionManager.d.ts +223 -0
  287. package/dist/core/EvolutionManager.d.ts.map +1 -0
  288. package/dist/core/EvolutionManager.js +630 -0
  289. package/dist/core/EvolutionManager.js.map +1 -0
  290. package/dist/core/ExecutionJournal.d.ts +101 -0
  291. package/dist/core/ExecutionJournal.d.ts.map +1 -0
  292. package/dist/core/ExecutionJournal.js +301 -0
  293. package/dist/core/ExecutionJournal.js.map +1 -0
  294. package/dist/core/ExternalOperationGate.d.ts +204 -0
  295. package/dist/core/ExternalOperationGate.d.ts.map +1 -0
  296. package/dist/core/ExternalOperationGate.js +413 -0
  297. package/dist/core/ExternalOperationGate.js.map +1 -0
  298. package/dist/core/FeatureDefinitions.d.ts +14 -0
  299. package/dist/core/FeatureDefinitions.d.ts.map +1 -0
  300. package/dist/core/FeatureDefinitions.js +374 -0
  301. package/dist/core/FeatureDefinitions.js.map +1 -0
  302. package/dist/core/FeatureRegistry.d.ts +337 -0
  303. package/dist/core/FeatureRegistry.d.ts.map +1 -0
  304. package/dist/core/FeatureRegistry.js +863 -0
  305. package/dist/core/FeatureRegistry.js.map +1 -0
  306. package/dist/core/FeedbackManager.d.ts +69 -0
  307. package/dist/core/FeedbackManager.d.ts.map +1 -0
  308. package/dist/core/FeedbackManager.js +284 -0
  309. package/dist/core/FeedbackManager.js.map +1 -0
  310. package/dist/core/FileClassifier.d.ts +74 -0
  311. package/dist/core/FileClassifier.d.ts.map +1 -0
  312. package/dist/core/FileClassifier.js +377 -0
  313. package/dist/core/FileClassifier.js.map +1 -0
  314. package/dist/core/ForegroundRestartWatcher.d.ts +55 -0
  315. package/dist/core/ForegroundRestartWatcher.d.ts.map +1 -0
  316. package/dist/core/ForegroundRestartWatcher.js +116 -0
  317. package/dist/core/ForegroundRestartWatcher.js.map +1 -0
  318. package/dist/core/GitStateManager.d.ts +78 -0
  319. package/dist/core/GitStateManager.d.ts.map +1 -0
  320. package/dist/core/GitStateManager.js +366 -0
  321. package/dist/core/GitStateManager.js.map +1 -0
  322. package/dist/core/GitSync.d.ts +199 -0
  323. package/dist/core/GitSync.d.ts.map +1 -0
  324. package/dist/core/GitSync.js +955 -0
  325. package/dist/core/GitSync.js.map +1 -0
  326. package/dist/core/GlobalInstallCleanup.d.ts +23 -0
  327. package/dist/core/GlobalInstallCleanup.d.ts.map +1 -0
  328. package/dist/core/GlobalInstallCleanup.js +130 -0
  329. package/dist/core/GlobalInstallCleanup.js.map +1 -0
  330. package/dist/core/GlobalSecretStore.d.ts +112 -0
  331. package/dist/core/GlobalSecretStore.d.ts.map +1 -0
  332. package/dist/core/GlobalSecretStore.js +396 -0
  333. package/dist/core/GlobalSecretStore.js.map +1 -0
  334. package/dist/core/HandoffManager.d.ts +163 -0
  335. package/dist/core/HandoffManager.d.ts.map +1 -0
  336. package/dist/core/HandoffManager.js +370 -0
  337. package/dist/core/HandoffManager.js.map +1 -0
  338. package/dist/core/HeartbeatManager.d.ts +120 -0
  339. package/dist/core/HeartbeatManager.d.ts.map +1 -0
  340. package/dist/core/HeartbeatManager.js +240 -0
  341. package/dist/core/HeartbeatManager.js.map +1 -0
  342. package/dist/core/InputGuard.d.ts +98 -0
  343. package/dist/core/InputGuard.d.ts.map +1 -0
  344. package/dist/core/InputGuard.js +316 -0
  345. package/dist/core/InputGuard.js.map +1 -0
  346. package/dist/core/IntentDriftDetector.d.ts +100 -0
  347. package/dist/core/IntentDriftDetector.d.ts.map +1 -0
  348. package/dist/core/IntentDriftDetector.js +325 -0
  349. package/dist/core/IntentDriftDetector.js.map +1 -0
  350. package/dist/core/JobReflector.d.ts +81 -0
  351. package/dist/core/JobReflector.d.ts.map +1 -0
  352. package/dist/core/JobReflector.js +244 -0
  353. package/dist/core/JobReflector.js.map +1 -0
  354. package/dist/core/LLMConflictResolver.d.ts +132 -0
  355. package/dist/core/LLMConflictResolver.d.ts.map +1 -0
  356. package/dist/core/LLMConflictResolver.js +372 -0
  357. package/dist/core/LLMConflictResolver.js.map +1 -0
  358. package/dist/core/LedgerAuth.d.ts +99 -0
  359. package/dist/core/LedgerAuth.d.ts.map +1 -0
  360. package/dist/core/LedgerAuth.js +215 -0
  361. package/dist/core/LedgerAuth.js.map +1 -0
  362. package/dist/core/MachineIdentity.d.ts +196 -0
  363. package/dist/core/MachineIdentity.d.ts.map +1 -0
  364. package/dist/core/MachineIdentity.js +476 -0
  365. package/dist/core/MachineIdentity.js.map +1 -0
  366. package/dist/core/MessageSentinel.d.ts +142 -0
  367. package/dist/core/MessageSentinel.d.ts.map +1 -0
  368. package/dist/core/MessageSentinel.js +426 -0
  369. package/dist/core/MessageSentinel.js.map +1 -0
  370. package/dist/core/MigrationProvenance.d.ts +62 -0
  371. package/dist/core/MigrationProvenance.d.ts.map +1 -0
  372. package/dist/core/MigrationProvenance.js +183 -0
  373. package/dist/core/MigrationProvenance.js.map +1 -0
  374. package/dist/core/MultiMachineCoordinator.d.ts +106 -0
  375. package/dist/core/MultiMachineCoordinator.d.ts.map +1 -0
  376. package/dist/core/MultiMachineCoordinator.js +311 -0
  377. package/dist/core/MultiMachineCoordinator.js.map +1 -0
  378. package/dist/core/NonceStore.d.ts +72 -0
  379. package/dist/core/NonceStore.d.ts.map +1 -0
  380. package/dist/core/NonceStore.js +163 -0
  381. package/dist/core/NonceStore.js.map +1 -0
  382. package/dist/core/OrgIntentManager.d.ts +58 -0
  383. package/dist/core/OrgIntentManager.d.ts.map +1 -0
  384. package/dist/core/OrgIntentManager.js +250 -0
  385. package/dist/core/OrgIntentManager.js.map +1 -0
  386. package/dist/core/OverlapGuard.d.ts +112 -0
  387. package/dist/core/OverlapGuard.d.ts.map +1 -0
  388. package/dist/core/OverlapGuard.js +241 -0
  389. package/dist/core/OverlapGuard.js.map +1 -0
  390. package/dist/core/PairingProtocol.d.ts +129 -0
  391. package/dist/core/PairingProtocol.d.ts.map +1 -0
  392. package/dist/core/PairingProtocol.js +265 -0
  393. package/dist/core/PairingProtocol.js.map +1 -0
  394. package/dist/core/PatternAnalyzer.d.ts +128 -0
  395. package/dist/core/PatternAnalyzer.d.ts.map +1 -0
  396. package/dist/core/PatternAnalyzer.js +388 -0
  397. package/dist/core/PatternAnalyzer.js.map +1 -0
  398. package/dist/core/PlatformActivityRegistry.d.ts +163 -0
  399. package/dist/core/PlatformActivityRegistry.d.ts.map +1 -0
  400. package/dist/core/PlatformActivityRegistry.js +307 -0
  401. package/dist/core/PlatformActivityRegistry.js.map +1 -0
  402. package/dist/core/PolicyEnforcementLayer.d.ts +63 -0
  403. package/dist/core/PolicyEnforcementLayer.d.ts.map +1 -0
  404. package/dist/core/PolicyEnforcementLayer.js +250 -0
  405. package/dist/core/PolicyEnforcementLayer.js.map +1 -0
  406. package/dist/core/PortRegistry.d.ts +9 -0
  407. package/dist/core/PortRegistry.d.ts.map +1 -0
  408. package/dist/core/PortRegistry.js +8 -0
  409. package/dist/core/PortRegistry.js.map +1 -0
  410. package/dist/core/PostUpdateMigrator.d.ts +170 -0
  411. package/dist/core/PostUpdateMigrator.d.ts.map +1 -0
  412. package/dist/core/PostUpdateMigrator.js +3674 -0
  413. package/dist/core/PostUpdateMigrator.js.map +1 -0
  414. package/dist/core/Prerequisites.d.ts +37 -0
  415. package/dist/core/Prerequisites.d.ts.map +1 -0
  416. package/dist/core/Prerequisites.js +272 -0
  417. package/dist/core/Prerequisites.js.map +1 -0
  418. package/dist/core/ProcessIntegrity.d.ts +90 -0
  419. package/dist/core/ProcessIntegrity.d.ts.map +1 -0
  420. package/dist/core/ProcessIntegrity.js +119 -0
  421. package/dist/core/ProcessIntegrity.js.map +1 -0
  422. package/dist/core/ProjectMapper.d.ts +97 -0
  423. package/dist/core/ProjectMapper.d.ts.map +1 -0
  424. package/dist/core/ProjectMapper.js +370 -0
  425. package/dist/core/ProjectMapper.js.map +1 -0
  426. package/dist/core/PromptGuard.d.ts +121 -0
  427. package/dist/core/PromptGuard.d.ts.map +1 -0
  428. package/dist/core/PromptGuard.js +259 -0
  429. package/dist/core/PromptGuard.js.map +1 -0
  430. package/dist/core/RecipientResolver.d.ts +54 -0
  431. package/dist/core/RecipientResolver.d.ts.map +1 -0
  432. package/dist/core/RecipientResolver.js +143 -0
  433. package/dist/core/RecipientResolver.js.map +1 -0
  434. package/dist/core/ReflectionConsolidator.d.ts +73 -0
  435. package/dist/core/ReflectionConsolidator.d.ts.map +1 -0
  436. package/dist/core/ReflectionConsolidator.js +202 -0
  437. package/dist/core/ReflectionConsolidator.js.map +1 -0
  438. package/dist/core/RelationshipManager.d.ts +146 -0
  439. package/dist/core/RelationshipManager.d.ts.map +1 -0
  440. package/dist/core/RelationshipManager.js +736 -0
  441. package/dist/core/RelationshipManager.js.map +1 -0
  442. package/dist/core/RelevanceFilter.d.ts +61 -0
  443. package/dist/core/RelevanceFilter.d.ts.map +1 -0
  444. package/dist/core/RelevanceFilter.js +160 -0
  445. package/dist/core/RelevanceFilter.js.map +1 -0
  446. package/dist/core/ResearchRateLimiter.d.ts +76 -0
  447. package/dist/core/ResearchRateLimiter.d.ts.map +1 -0
  448. package/dist/core/ResearchRateLimiter.js +168 -0
  449. package/dist/core/ResearchRateLimiter.js.map +1 -0
  450. package/dist/core/ResumeValidator.d.ts +58 -0
  451. package/dist/core/ResumeValidator.d.ts.map +1 -0
  452. package/dist/core/ResumeValidator.js +195 -0
  453. package/dist/core/ResumeValidator.js.map +1 -0
  454. package/dist/core/ScopeCoherenceTracker.d.ts +87 -0
  455. package/dist/core/ScopeCoherenceTracker.d.ts.map +1 -0
  456. package/dist/core/ScopeCoherenceTracker.js +226 -0
  457. package/dist/core/ScopeCoherenceTracker.js.map +1 -0
  458. package/dist/core/ScopeVerifier.d.ts +122 -0
  459. package/dist/core/ScopeVerifier.d.ts.map +1 -0
  460. package/dist/core/ScopeVerifier.js +350 -0
  461. package/dist/core/ScopeVerifier.js.map +1 -0
  462. package/dist/core/SecretManager.d.ts +120 -0
  463. package/dist/core/SecretManager.d.ts.map +1 -0
  464. package/dist/core/SecretManager.js +324 -0
  465. package/dist/core/SecretManager.js.map +1 -0
  466. package/dist/core/SecretMigrator.d.ts +39 -0
  467. package/dist/core/SecretMigrator.d.ts.map +1 -0
  468. package/dist/core/SecretMigrator.js +182 -0
  469. package/dist/core/SecretMigrator.js.map +1 -0
  470. package/dist/core/SecretRedactor.d.ts +121 -0
  471. package/dist/core/SecretRedactor.d.ts.map +1 -0
  472. package/dist/core/SecretRedactor.js +309 -0
  473. package/dist/core/SecretRedactor.js.map +1 -0
  474. package/dist/core/SecretStore.d.ts +104 -0
  475. package/dist/core/SecretStore.d.ts.map +1 -0
  476. package/dist/core/SecretStore.js +405 -0
  477. package/dist/core/SecretStore.js.map +1 -0
  478. package/dist/core/SecurityLog.d.ts +58 -0
  479. package/dist/core/SecurityLog.d.ts.map +1 -0
  480. package/dist/core/SecurityLog.js +123 -0
  481. package/dist/core/SecurityLog.js.map +1 -0
  482. package/dist/core/SendGateway.d.ts +77 -0
  483. package/dist/core/SendGateway.d.ts.map +1 -0
  484. package/dist/core/SendGateway.js +181 -0
  485. package/dist/core/SendGateway.js.map +1 -0
  486. package/dist/core/SessionManager.d.ts +304 -0
  487. package/dist/core/SessionManager.d.ts.map +1 -0
  488. package/dist/core/SessionManager.js +1402 -0
  489. package/dist/core/SessionManager.js.map +1 -0
  490. package/dist/core/SleepWakeDetector.d.ts +37 -0
  491. package/dist/core/SleepWakeDetector.d.ts.map +1 -0
  492. package/dist/core/SleepWakeDetector.js +59 -0
  493. package/dist/core/SleepWakeDetector.js.map +1 -0
  494. package/dist/core/SoulManager.d.ts +107 -0
  495. package/dist/core/SoulManager.d.ts.map +1 -0
  496. package/dist/core/SoulManager.js +574 -0
  497. package/dist/core/SoulManager.js.map +1 -0
  498. package/dist/core/StaleProcessGuard.d.ts +113 -0
  499. package/dist/core/StaleProcessGuard.d.ts.map +1 -0
  500. package/dist/core/StaleProcessGuard.js +134 -0
  501. package/dist/core/StaleProcessGuard.js.map +1 -0
  502. package/dist/core/StateManager.d.ts +56 -0
  503. package/dist/core/StateManager.d.ts.map +1 -0
  504. package/dist/core/StateManager.js +266 -0
  505. package/dist/core/StateManager.js.map +1 -0
  506. package/dist/core/StateWriteAuthority.d.ts +101 -0
  507. package/dist/core/StateWriteAuthority.d.ts.map +1 -0
  508. package/dist/core/StateWriteAuthority.js +169 -0
  509. package/dist/core/StateWriteAuthority.js.map +1 -0
  510. package/dist/core/SurfacingTemplates.d.ts +63 -0
  511. package/dist/core/SurfacingTemplates.d.ts.map +1 -0
  512. package/dist/core/SurfacingTemplates.js +138 -0
  513. package/dist/core/SurfacingTemplates.js.map +1 -0
  514. package/dist/core/SyncOrchestrator.d.ts +308 -0
  515. package/dist/core/SyncOrchestrator.d.ts.map +1 -0
  516. package/dist/core/SyncOrchestrator.js +925 -0
  517. package/dist/core/SyncOrchestrator.js.map +1 -0
  518. package/dist/core/TemporalCoherenceChecker.d.ts +140 -0
  519. package/dist/core/TemporalCoherenceChecker.d.ts.map +1 -0
  520. package/dist/core/TemporalCoherenceChecker.js +375 -0
  521. package/dist/core/TemporalCoherenceChecker.js.map +1 -0
  522. package/dist/core/TopicClassifier.d.ts +54 -0
  523. package/dist/core/TopicClassifier.d.ts.map +1 -0
  524. package/dist/core/TopicClassifier.js +144 -0
  525. package/dist/core/TopicClassifier.js.map +1 -0
  526. package/dist/core/TopicResumeMap.d.ts +76 -0
  527. package/dist/core/TopicResumeMap.d.ts.map +1 -0
  528. package/dist/core/TopicResumeMap.js +252 -0
  529. package/dist/core/TopicResumeMap.js.map +1 -0
  530. package/dist/core/TrustElevationTracker.d.ts +178 -0
  531. package/dist/core/TrustElevationTracker.d.ts.map +1 -0
  532. package/dist/core/TrustElevationTracker.js +343 -0
  533. package/dist/core/TrustElevationTracker.js.map +1 -0
  534. package/dist/core/TrustRecovery.d.ts +109 -0
  535. package/dist/core/TrustRecovery.d.ts.map +1 -0
  536. package/dist/core/TrustRecovery.js +190 -0
  537. package/dist/core/TrustRecovery.js.map +1 -0
  538. package/dist/core/UpdateChecker.d.ts +108 -0
  539. package/dist/core/UpdateChecker.d.ts.map +1 -0
  540. package/dist/core/UpdateChecker.js +593 -0
  541. package/dist/core/UpdateChecker.js.map +1 -0
  542. package/dist/core/UpdateGate.d.ts +102 -0
  543. package/dist/core/UpdateGate.d.ts.map +1 -0
  544. package/dist/core/UpdateGate.js +149 -0
  545. package/dist/core/UpdateGate.js.map +1 -0
  546. package/dist/core/UpgradeGuideProcessor.d.ts +105 -0
  547. package/dist/core/UpgradeGuideProcessor.d.ts.map +1 -0
  548. package/dist/core/UpgradeGuideProcessor.js +278 -0
  549. package/dist/core/UpgradeGuideProcessor.js.map +1 -0
  550. package/dist/core/UpgradeNotifyManager.d.ts +98 -0
  551. package/dist/core/UpgradeNotifyManager.d.ts.map +1 -0
  552. package/dist/core/UpgradeNotifyManager.js +205 -0
  553. package/dist/core/UpgradeNotifyManager.js.map +1 -0
  554. package/dist/core/WorkLedger.d.ts +144 -0
  555. package/dist/core/WorkLedger.d.ts.map +1 -0
  556. package/dist/core/WorkLedger.js +246 -0
  557. package/dist/core/WorkLedger.js.map +1 -0
  558. package/dist/core/models.d.ts +70 -0
  559. package/dist/core/models.d.ts.map +1 -0
  560. package/dist/core/models.js +110 -0
  561. package/dist/core/models.js.map +1 -0
  562. package/dist/core/reviewers/capability-accuracy.d.ts +13 -0
  563. package/dist/core/reviewers/capability-accuracy.d.ts.map +1 -0
  564. package/dist/core/reviewers/capability-accuracy.js +38 -0
  565. package/dist/core/reviewers/capability-accuracy.js.map +1 -0
  566. package/dist/core/reviewers/claim-provenance.d.ts +14 -0
  567. package/dist/core/reviewers/claim-provenance.d.ts.map +1 -0
  568. package/dist/core/reviewers/claim-provenance.js +50 -0
  569. package/dist/core/reviewers/claim-provenance.js.map +1 -0
  570. package/dist/core/reviewers/context-completeness.d.ts +13 -0
  571. package/dist/core/reviewers/context-completeness.d.ts.map +1 -0
  572. package/dist/core/reviewers/context-completeness.js +43 -0
  573. package/dist/core/reviewers/context-completeness.js.map +1 -0
  574. package/dist/core/reviewers/conversational-tone.d.ts +13 -0
  575. package/dist/core/reviewers/conversational-tone.d.ts.map +1 -0
  576. package/dist/core/reviewers/conversational-tone.js +55 -0
  577. package/dist/core/reviewers/conversational-tone.js.map +1 -0
  578. package/dist/core/reviewers/escalation-resolution.d.ts +56 -0
  579. package/dist/core/reviewers/escalation-resolution.d.ts.map +1 -0
  580. package/dist/core/reviewers/escalation-resolution.js +239 -0
  581. package/dist/core/reviewers/escalation-resolution.js.map +1 -0
  582. package/dist/core/reviewers/gate-reviewer.d.ts +26 -0
  583. package/dist/core/reviewers/gate-reviewer.d.ts.map +1 -0
  584. package/dist/core/reviewers/gate-reviewer.js +130 -0
  585. package/dist/core/reviewers/gate-reviewer.js.map +1 -0
  586. package/dist/core/reviewers/information-leakage.d.ts +21 -0
  587. package/dist/core/reviewers/information-leakage.d.ts.map +1 -0
  588. package/dist/core/reviewers/information-leakage.js +72 -0
  589. package/dist/core/reviewers/information-leakage.js.map +1 -0
  590. package/dist/core/reviewers/settling-detection.d.ts +13 -0
  591. package/dist/core/reviewers/settling-detection.d.ts.map +1 -0
  592. package/dist/core/reviewers/settling-detection.js +48 -0
  593. package/dist/core/reviewers/settling-detection.js.map +1 -0
  594. package/dist/core/reviewers/url-validity.d.ts +18 -0
  595. package/dist/core/reviewers/url-validity.d.ts.map +1 -0
  596. package/dist/core/reviewers/url-validity.js +60 -0
  597. package/dist/core/reviewers/url-validity.js.map +1 -0
  598. package/dist/core/reviewers/value-alignment.d.ts +14 -0
  599. package/dist/core/reviewers/value-alignment.d.ts.map +1 -0
  600. package/dist/core/reviewers/value-alignment.js +71 -0
  601. package/dist/core/reviewers/value-alignment.js.map +1 -0
  602. package/dist/core/types.d.ts +2159 -0
  603. package/dist/core/types.d.ts.map +1 -0
  604. package/dist/core/types.js +20 -0
  605. package/dist/core/types.js.map +1 -0
  606. package/dist/data/http-hook-templates.d.ts +53 -0
  607. package/dist/data/http-hook-templates.d.ts.map +1 -0
  608. package/dist/data/http-hook-templates.js +64 -0
  609. package/dist/data/http-hook-templates.js.map +1 -0
  610. package/dist/index.d.ts +263 -0
  611. package/dist/index.d.ts.map +1 -0
  612. package/dist/index.js +164 -0
  613. package/dist/index.js.map +1 -0
  614. package/dist/knowledge/CoverageAuditor.d.ts +58 -0
  615. package/dist/knowledge/CoverageAuditor.d.ts.map +1 -0
  616. package/dist/knowledge/CoverageAuditor.js +153 -0
  617. package/dist/knowledge/CoverageAuditor.js.map +1 -0
  618. package/dist/knowledge/IntegrityManager.d.ts +46 -0
  619. package/dist/knowledge/IntegrityManager.d.ts.map +1 -0
  620. package/dist/knowledge/IntegrityManager.js +101 -0
  621. package/dist/knowledge/IntegrityManager.js.map +1 -0
  622. package/dist/knowledge/KnowledgeManager.d.ts +85 -0
  623. package/dist/knowledge/KnowledgeManager.d.ts.map +1 -0
  624. package/dist/knowledge/KnowledgeManager.js +194 -0
  625. package/dist/knowledge/KnowledgeManager.js.map +1 -0
  626. package/dist/knowledge/ProbeRegistry.d.ts +54 -0
  627. package/dist/knowledge/ProbeRegistry.d.ts.map +1 -0
  628. package/dist/knowledge/ProbeRegistry.js +119 -0
  629. package/dist/knowledge/ProbeRegistry.js.map +1 -0
  630. package/dist/knowledge/SelfKnowledgeTree.d.ts +108 -0
  631. package/dist/knowledge/SelfKnowledgeTree.d.ts.map +1 -0
  632. package/dist/knowledge/SelfKnowledgeTree.js +560 -0
  633. package/dist/knowledge/SelfKnowledgeTree.js.map +1 -0
  634. package/dist/knowledge/TreeGenerator.d.ts +57 -0
  635. package/dist/knowledge/TreeGenerator.d.ts.map +1 -0
  636. package/dist/knowledge/TreeGenerator.js +527 -0
  637. package/dist/knowledge/TreeGenerator.js.map +1 -0
  638. package/dist/knowledge/TreeSynthesis.d.ts +24 -0
  639. package/dist/knowledge/TreeSynthesis.d.ts.map +1 -0
  640. package/dist/knowledge/TreeSynthesis.js +61 -0
  641. package/dist/knowledge/TreeSynthesis.js.map +1 -0
  642. package/dist/knowledge/TreeTraversal.d.ts +93 -0
  643. package/dist/knowledge/TreeTraversal.d.ts.map +1 -0
  644. package/dist/knowledge/TreeTraversal.js +359 -0
  645. package/dist/knowledge/TreeTraversal.js.map +1 -0
  646. package/dist/knowledge/TreeTriage.d.ts +80 -0
  647. package/dist/knowledge/TreeTriage.d.ts.map +1 -0
  648. package/dist/knowledge/TreeTriage.js +413 -0
  649. package/dist/knowledge/TreeTriage.js.map +1 -0
  650. package/dist/knowledge/types.d.ts +183 -0
  651. package/dist/knowledge/types.d.ts.map +1 -0
  652. package/dist/knowledge/types.js +28 -0
  653. package/dist/knowledge/types.js.map +1 -0
  654. package/dist/lifeline/MessageQueue.d.ts +42 -0
  655. package/dist/lifeline/MessageQueue.d.ts.map +1 -0
  656. package/dist/lifeline/MessageQueue.js +63 -0
  657. package/dist/lifeline/MessageQueue.js.map +1 -0
  658. package/dist/lifeline/ServerSupervisor.d.ts +203 -0
  659. package/dist/lifeline/ServerSupervisor.d.ts.map +1 -0
  660. package/dist/lifeline/ServerSupervisor.js +1103 -0
  661. package/dist/lifeline/ServerSupervisor.js.map +1 -0
  662. package/dist/lifeline/SlackLifeline.d.ts +43 -0
  663. package/dist/lifeline/SlackLifeline.d.ts.map +1 -0
  664. package/dist/lifeline/SlackLifeline.js +227 -0
  665. package/dist/lifeline/SlackLifeline.js.map +1 -0
  666. package/dist/lifeline/TelegramLifeline.d.ts +180 -0
  667. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -0
  668. package/dist/lifeline/TelegramLifeline.js +1533 -0
  669. package/dist/lifeline/TelegramLifeline.js.map +1 -0
  670. package/dist/memory/ActivityPartitioner.d.ts +67 -0
  671. package/dist/memory/ActivityPartitioner.d.ts.map +1 -0
  672. package/dist/memory/ActivityPartitioner.js +193 -0
  673. package/dist/memory/ActivityPartitioner.js.map +1 -0
  674. package/dist/memory/Chunker.d.ts +39 -0
  675. package/dist/memory/Chunker.d.ts.map +1 -0
  676. package/dist/memory/Chunker.js +154 -0
  677. package/dist/memory/Chunker.js.map +1 -0
  678. package/dist/memory/EmbeddingProvider.d.ts +82 -0
  679. package/dist/memory/EmbeddingProvider.d.ts.map +1 -0
  680. package/dist/memory/EmbeddingProvider.js +168 -0
  681. package/dist/memory/EmbeddingProvider.js.map +1 -0
  682. package/dist/memory/EpisodicMemory.d.ts +141 -0
  683. package/dist/memory/EpisodicMemory.d.ts.map +1 -0
  684. package/dist/memory/EpisodicMemory.js +303 -0
  685. package/dist/memory/EpisodicMemory.js.map +1 -0
  686. package/dist/memory/MemoryExporter.d.ts +82 -0
  687. package/dist/memory/MemoryExporter.d.ts.map +1 -0
  688. package/dist/memory/MemoryExporter.js +233 -0
  689. package/dist/memory/MemoryExporter.js.map +1 -0
  690. package/dist/memory/MemoryIndex.d.ts +76 -0
  691. package/dist/memory/MemoryIndex.d.ts.map +1 -0
  692. package/dist/memory/MemoryIndex.js +413 -0
  693. package/dist/memory/MemoryIndex.js.map +1 -0
  694. package/dist/memory/MemoryMigrator.d.ts +103 -0
  695. package/dist/memory/MemoryMigrator.d.ts.map +1 -0
  696. package/dist/memory/MemoryMigrator.js +510 -0
  697. package/dist/memory/MemoryMigrator.js.map +1 -0
  698. package/dist/memory/SemanticMemory.d.ts +255 -0
  699. package/dist/memory/SemanticMemory.d.ts.map +1 -0
  700. package/dist/memory/SemanticMemory.js +1130 -0
  701. package/dist/memory/SemanticMemory.js.map +1 -0
  702. package/dist/memory/TopicMemory.d.ts +227 -0
  703. package/dist/memory/TopicMemory.d.ts.map +1 -0
  704. package/dist/memory/TopicMemory.js +731 -0
  705. package/dist/memory/TopicMemory.js.map +1 -0
  706. package/dist/memory/TopicSummarizer.d.ts +69 -0
  707. package/dist/memory/TopicSummarizer.d.ts.map +1 -0
  708. package/dist/memory/TopicSummarizer.js +163 -0
  709. package/dist/memory/TopicSummarizer.js.map +1 -0
  710. package/dist/memory/VectorSearch.d.ts +80 -0
  711. package/dist/memory/VectorSearch.d.ts.map +1 -0
  712. package/dist/memory/VectorSearch.js +148 -0
  713. package/dist/memory/VectorSearch.js.map +1 -0
  714. package/dist/memory/WorkingMemoryAssembler.d.ts +122 -0
  715. package/dist/memory/WorkingMemoryAssembler.d.ts.map +1 -0
  716. package/dist/memory/WorkingMemoryAssembler.js +406 -0
  717. package/dist/memory/WorkingMemoryAssembler.js.map +1 -0
  718. package/dist/messaging/AdapterRegistry.d.ts +27 -0
  719. package/dist/messaging/AdapterRegistry.d.ts.map +1 -0
  720. package/dist/messaging/AdapterRegistry.js +40 -0
  721. package/dist/messaging/AdapterRegistry.js.map +1 -0
  722. package/dist/messaging/AgentTokenManager.d.ts +86 -0
  723. package/dist/messaging/AgentTokenManager.d.ts.map +1 -0
  724. package/dist/messaging/AgentTokenManager.js +213 -0
  725. package/dist/messaging/AgentTokenManager.js.map +1 -0
  726. package/dist/messaging/DeliveryRetryManager.d.ts +47 -0
  727. package/dist/messaging/DeliveryRetryManager.d.ts.map +1 -0
  728. package/dist/messaging/DeliveryRetryManager.js +201 -0
  729. package/dist/messaging/DeliveryRetryManager.js.map +1 -0
  730. package/dist/messaging/DropPickup.d.ts +37 -0
  731. package/dist/messaging/DropPickup.d.ts.map +1 -0
  732. package/dist/messaging/DropPickup.js +120 -0
  733. package/dist/messaging/DropPickup.js.map +1 -0
  734. package/dist/messaging/GitSyncTransport.d.ts +120 -0
  735. package/dist/messaging/GitSyncTransport.d.ts.map +1 -0
  736. package/dist/messaging/GitSyncTransport.js +296 -0
  737. package/dist/messaging/GitSyncTransport.js.map +1 -0
  738. package/dist/messaging/MessageDelivery.d.ts +27 -0
  739. package/dist/messaging/MessageDelivery.d.ts.map +1 -0
  740. package/dist/messaging/MessageDelivery.js +90 -0
  741. package/dist/messaging/MessageDelivery.js.map +1 -0
  742. package/dist/messaging/MessageFormatter.d.ts +30 -0
  743. package/dist/messaging/MessageFormatter.d.ts.map +1 -0
  744. package/dist/messaging/MessageFormatter.js +97 -0
  745. package/dist/messaging/MessageFormatter.js.map +1 -0
  746. package/dist/messaging/MessageRouter.d.ts +157 -0
  747. package/dist/messaging/MessageRouter.d.ts.map +1 -0
  748. package/dist/messaging/MessageRouter.js +657 -0
  749. package/dist/messaging/MessageRouter.js.map +1 -0
  750. package/dist/messaging/MessageStore.d.ts +52 -0
  751. package/dist/messaging/MessageStore.d.ts.map +1 -0
  752. package/dist/messaging/MessageStore.js +363 -0
  753. package/dist/messaging/MessageStore.js.map +1 -0
  754. package/dist/messaging/NotificationBatcher.d.ts +95 -0
  755. package/dist/messaging/NotificationBatcher.d.ts.map +1 -0
  756. package/dist/messaging/NotificationBatcher.js +253 -0
  757. package/dist/messaging/NotificationBatcher.js.map +1 -0
  758. package/dist/messaging/SessionSummarySentinel.d.ts +104 -0
  759. package/dist/messaging/SessionSummarySentinel.d.ts.map +1 -0
  760. package/dist/messaging/SessionSummarySentinel.js +386 -0
  761. package/dist/messaging/SessionSummarySentinel.js.map +1 -0
  762. package/dist/messaging/SpawnRequestManager.d.ts +88 -0
  763. package/dist/messaging/SpawnRequestManager.d.ts.map +1 -0
  764. package/dist/messaging/SpawnRequestManager.js +159 -0
  765. package/dist/messaging/SpawnRequestManager.js.map +1 -0
  766. package/dist/messaging/TelegramAdapter.d.ts +636 -0
  767. package/dist/messaging/TelegramAdapter.d.ts.map +1 -0
  768. package/dist/messaging/TelegramAdapter.js +3434 -0
  769. package/dist/messaging/TelegramAdapter.js.map +1 -0
  770. package/dist/messaging/TopicContentValidator.d.ts +81 -0
  771. package/dist/messaging/TopicContentValidator.d.ts.map +1 -0
  772. package/dist/messaging/TopicContentValidator.js +113 -0
  773. package/dist/messaging/TopicContentValidator.js.map +1 -0
  774. package/dist/messaging/WhatsAppAdapter.d.ts +224 -0
  775. package/dist/messaging/WhatsAppAdapter.d.ts.map +1 -0
  776. package/dist/messaging/WhatsAppAdapter.js +736 -0
  777. package/dist/messaging/WhatsAppAdapter.js.map +1 -0
  778. package/dist/messaging/backends/BaileysBackend.d.ts +74 -0
  779. package/dist/messaging/backends/BaileysBackend.d.ts.map +1 -0
  780. package/dist/messaging/backends/BaileysBackend.js +481 -0
  781. package/dist/messaging/backends/BaileysBackend.js.map +1 -0
  782. package/dist/messaging/backends/BusinessApiBackend.d.ts +173 -0
  783. package/dist/messaging/backends/BusinessApiBackend.d.ts.map +1 -0
  784. package/dist/messaging/backends/BusinessApiBackend.js +269 -0
  785. package/dist/messaging/backends/BusinessApiBackend.js.map +1 -0
  786. package/dist/messaging/backends/WhatsAppWebhookRoutes.d.ts +26 -0
  787. package/dist/messaging/backends/WhatsAppWebhookRoutes.d.ts.map +1 -0
  788. package/dist/messaging/backends/WhatsAppWebhookRoutes.js +50 -0
  789. package/dist/messaging/backends/WhatsAppWebhookRoutes.js.map +1 -0
  790. package/dist/messaging/shared/AuthGate.d.ts +102 -0
  791. package/dist/messaging/shared/AuthGate.d.ts.map +1 -0
  792. package/dist/messaging/shared/AuthGate.js +159 -0
  793. package/dist/messaging/shared/AuthGate.js.map +1 -0
  794. package/dist/messaging/shared/CommandRouter.d.ts +84 -0
  795. package/dist/messaging/shared/CommandRouter.d.ts.map +1 -0
  796. package/dist/messaging/shared/CommandRouter.js +145 -0
  797. package/dist/messaging/shared/CommandRouter.js.map +1 -0
  798. package/dist/messaging/shared/CrossPlatformAlerts.d.ts +67 -0
  799. package/dist/messaging/shared/CrossPlatformAlerts.d.ts.map +1 -0
  800. package/dist/messaging/shared/CrossPlatformAlerts.js +134 -0
  801. package/dist/messaging/shared/CrossPlatformAlerts.js.map +1 -0
  802. package/dist/messaging/shared/EncryptedAuthStore.d.ts +51 -0
  803. package/dist/messaging/shared/EncryptedAuthStore.d.ts.map +1 -0
  804. package/dist/messaging/shared/EncryptedAuthStore.js +194 -0
  805. package/dist/messaging/shared/EncryptedAuthStore.js.map +1 -0
  806. package/dist/messaging/shared/FeatureFlags.d.ts +21 -0
  807. package/dist/messaging/shared/FeatureFlags.d.ts.map +1 -0
  808. package/dist/messaging/shared/FeatureFlags.js +21 -0
  809. package/dist/messaging/shared/FeatureFlags.js.map +1 -0
  810. package/dist/messaging/shared/MessageBridge.d.ts +70 -0
  811. package/dist/messaging/shared/MessageBridge.d.ts.map +1 -0
  812. package/dist/messaging/shared/MessageBridge.js +178 -0
  813. package/dist/messaging/shared/MessageBridge.js.map +1 -0
  814. package/dist/messaging/shared/MessageLogger.d.ts +94 -0
  815. package/dist/messaging/shared/MessageLogger.d.ts.map +1 -0
  816. package/dist/messaging/shared/MessageLogger.js +173 -0
  817. package/dist/messaging/shared/MessageLogger.js.map +1 -0
  818. package/dist/messaging/shared/MessagingEventBus.d.ts +149 -0
  819. package/dist/messaging/shared/MessagingEventBus.d.ts.map +1 -0
  820. package/dist/messaging/shared/MessagingEventBus.js +111 -0
  821. package/dist/messaging/shared/MessagingEventBus.js.map +1 -0
  822. package/dist/messaging/shared/PhoneUtils.d.ts +44 -0
  823. package/dist/messaging/shared/PhoneUtils.d.ts.map +1 -0
  824. package/dist/messaging/shared/PhoneUtils.js +110 -0
  825. package/dist/messaging/shared/PhoneUtils.js.map +1 -0
  826. package/dist/messaging/shared/PrivacyConsent.d.ts +61 -0
  827. package/dist/messaging/shared/PrivacyConsent.d.ts.map +1 -0
  828. package/dist/messaging/shared/PrivacyConsent.js +132 -0
  829. package/dist/messaging/shared/PrivacyConsent.js.map +1 -0
  830. package/dist/messaging/shared/SessionChannelRegistry.d.ts +48 -0
  831. package/dist/messaging/shared/SessionChannelRegistry.d.ts.map +1 -0
  832. package/dist/messaging/shared/SessionChannelRegistry.js +144 -0
  833. package/dist/messaging/shared/SessionChannelRegistry.js.map +1 -0
  834. package/dist/messaging/shared/SmartChunker.d.ts +16 -0
  835. package/dist/messaging/shared/SmartChunker.d.ts.map +1 -0
  836. package/dist/messaging/shared/SmartChunker.js +100 -0
  837. package/dist/messaging/shared/SmartChunker.js.map +1 -0
  838. package/dist/messaging/shared/StallDetector.d.ts +85 -0
  839. package/dist/messaging/shared/StallDetector.d.ts.map +1 -0
  840. package/dist/messaging/shared/StallDetector.js +225 -0
  841. package/dist/messaging/shared/StallDetector.js.map +1 -0
  842. package/dist/messaging/shared/index.d.ts +22 -0
  843. package/dist/messaging/shared/index.d.ts.map +1 -0
  844. package/dist/messaging/shared/index.js +13 -0
  845. package/dist/messaging/shared/index.js.map +1 -0
  846. package/dist/messaging/slack/ChannelManager.d.ts +36 -0
  847. package/dist/messaging/slack/ChannelManager.d.ts.map +1 -0
  848. package/dist/messaging/slack/ChannelManager.js +100 -0
  849. package/dist/messaging/slack/ChannelManager.js.map +1 -0
  850. package/dist/messaging/slack/FileHandler.d.ts +30 -0
  851. package/dist/messaging/slack/FileHandler.d.ts.map +1 -0
  852. package/dist/messaging/slack/FileHandler.js +87 -0
  853. package/dist/messaging/slack/FileHandler.js.map +1 -0
  854. package/dist/messaging/slack/RingBuffer.d.ts +22 -0
  855. package/dist/messaging/slack/RingBuffer.d.ts.map +1 -0
  856. package/dist/messaging/slack/RingBuffer.js +48 -0
  857. package/dist/messaging/slack/RingBuffer.js.map +1 -0
  858. package/dist/messaging/slack/SlackAdapter.d.ts +283 -0
  859. package/dist/messaging/slack/SlackAdapter.d.ts.map +1 -0
  860. package/dist/messaging/slack/SlackAdapter.js +1524 -0
  861. package/dist/messaging/slack/SlackAdapter.js.map +1 -0
  862. package/dist/messaging/slack/SlackApiClient.d.ts +51 -0
  863. package/dist/messaging/slack/SlackApiClient.d.ts.map +1 -0
  864. package/dist/messaging/slack/SlackApiClient.js +94 -0
  865. package/dist/messaging/slack/SlackApiClient.js.map +1 -0
  866. package/dist/messaging/slack/SocketModeClient.d.ts +44 -0
  867. package/dist/messaging/slack/SocketModeClient.d.ts.map +1 -0
  868. package/dist/messaging/slack/SocketModeClient.js +209 -0
  869. package/dist/messaging/slack/SocketModeClient.js.map +1 -0
  870. package/dist/messaging/slack/index.d.ts +12 -0
  871. package/dist/messaging/slack/index.d.ts.map +1 -0
  872. package/dist/messaging/slack/index.js +15 -0
  873. package/dist/messaging/slack/index.js.map +1 -0
  874. package/dist/messaging/slack/sanitize.d.ts +39 -0
  875. package/dist/messaging/slack/sanitize.d.ts.map +1 -0
  876. package/dist/messaging/slack/sanitize.js +71 -0
  877. package/dist/messaging/slack/sanitize.js.map +1 -0
  878. package/dist/messaging/slack/types.d.ts +186 -0
  879. package/dist/messaging/slack/types.d.ts.map +1 -0
  880. package/dist/messaging/slack/types.js +54 -0
  881. package/dist/messaging/slack/types.js.map +1 -0
  882. package/dist/messaging/types.d.ts +400 -0
  883. package/dist/messaging/types.d.ts.map +1 -0
  884. package/dist/messaging/types.js +89 -0
  885. package/dist/messaging/types.js.map +1 -0
  886. package/dist/monitoring/AccountSwitcher.d.ts +61 -0
  887. package/dist/monitoring/AccountSwitcher.d.ts.map +1 -0
  888. package/dist/monitoring/AccountSwitcher.js +196 -0
  889. package/dist/monitoring/AccountSwitcher.js.map +1 -0
  890. package/dist/monitoring/CoherenceMonitor.d.ts +133 -0
  891. package/dist/monitoring/CoherenceMonitor.d.ts.map +1 -0
  892. package/dist/monitoring/CoherenceMonitor.js +550 -0
  893. package/dist/monitoring/CoherenceMonitor.js.map +1 -0
  894. package/dist/monitoring/CommitmentSentinel.d.ts +57 -0
  895. package/dist/monitoring/CommitmentSentinel.d.ts.map +1 -0
  896. package/dist/monitoring/CommitmentSentinel.js +251 -0
  897. package/dist/monitoring/CommitmentSentinel.js.map +1 -0
  898. package/dist/monitoring/CommitmentTracker.d.ts +186 -0
  899. package/dist/monitoring/CommitmentTracker.d.ts.map +1 -0
  900. package/dist/monitoring/CommitmentTracker.js +522 -0
  901. package/dist/monitoring/CommitmentTracker.js.map +1 -0
  902. package/dist/monitoring/CredentialProvider.d.ts +84 -0
  903. package/dist/monitoring/CredentialProvider.d.ts.map +1 -0
  904. package/dist/monitoring/CredentialProvider.js +196 -0
  905. package/dist/monitoring/CredentialProvider.js.map +1 -0
  906. package/dist/monitoring/DegradationReporter.d.ts +123 -0
  907. package/dist/monitoring/DegradationReporter.d.ts.map +1 -0
  908. package/dist/monitoring/DegradationReporter.js +241 -0
  909. package/dist/monitoring/DegradationReporter.js.map +1 -0
  910. package/dist/monitoring/FeedbackAnomalyDetector.d.ts +51 -0
  911. package/dist/monitoring/FeedbackAnomalyDetector.d.ts.map +1 -0
  912. package/dist/monitoring/FeedbackAnomalyDetector.js +120 -0
  913. package/dist/monitoring/FeedbackAnomalyDetector.js.map +1 -0
  914. package/dist/monitoring/HealthChecker.d.ts +45 -0
  915. package/dist/monitoring/HealthChecker.d.ts.map +1 -0
  916. package/dist/monitoring/HealthChecker.js +219 -0
  917. package/dist/monitoring/HealthChecker.js.map +1 -0
  918. package/dist/monitoring/HomeostasisMonitor.d.ts +102 -0
  919. package/dist/monitoring/HomeostasisMonitor.d.ts.map +1 -0
  920. package/dist/monitoring/HomeostasisMonitor.js +185 -0
  921. package/dist/monitoring/HomeostasisMonitor.js.map +1 -0
  922. package/dist/monitoring/HookEventReceiver.d.ts +132 -0
  923. package/dist/monitoring/HookEventReceiver.d.ts.map +1 -0
  924. package/dist/monitoring/HookEventReceiver.js +209 -0
  925. package/dist/monitoring/HookEventReceiver.js.map +1 -0
  926. package/dist/monitoring/InputClassifier.d.ts +68 -0
  927. package/dist/monitoring/InputClassifier.d.ts.map +1 -0
  928. package/dist/monitoring/InputClassifier.js +243 -0
  929. package/dist/monitoring/InputClassifier.js.map +1 -0
  930. package/dist/monitoring/InstructionsVerifier.d.ts +76 -0
  931. package/dist/monitoring/InstructionsVerifier.d.ts.map +1 -0
  932. package/dist/monitoring/InstructionsVerifier.js +116 -0
  933. package/dist/monitoring/InstructionsVerifier.js.map +1 -0
  934. package/dist/monitoring/MemoryPressureMonitor.d.ts +107 -0
  935. package/dist/monitoring/MemoryPressureMonitor.d.ts.map +1 -0
  936. package/dist/monitoring/MemoryPressureMonitor.js +329 -0
  937. package/dist/monitoring/MemoryPressureMonitor.js.map +1 -0
  938. package/dist/monitoring/OrphanProcessReaper.d.ts +125 -0
  939. package/dist/monitoring/OrphanProcessReaper.d.ts.map +1 -0
  940. package/dist/monitoring/OrphanProcessReaper.js +476 -0
  941. package/dist/monitoring/OrphanProcessReaper.js.map +1 -0
  942. package/dist/monitoring/PresenceProxy.d.ts +167 -0
  943. package/dist/monitoring/PresenceProxy.d.ts.map +1 -0
  944. package/dist/monitoring/PresenceProxy.js +972 -0
  945. package/dist/monitoring/PresenceProxy.js.map +1 -0
  946. package/dist/monitoring/PromptGate.d.ts +91 -0
  947. package/dist/monitoring/PromptGate.d.ts.map +1 -0
  948. package/dist/monitoring/PromptGate.js +411 -0
  949. package/dist/monitoring/PromptGate.js.map +1 -0
  950. package/dist/monitoring/QuotaCollector.d.ts +267 -0
  951. package/dist/monitoring/QuotaCollector.d.ts.map +1 -0
  952. package/dist/monitoring/QuotaCollector.js +790 -0
  953. package/dist/monitoring/QuotaCollector.js.map +1 -0
  954. package/dist/monitoring/QuotaExhaustionDetector.d.ts +21 -0
  955. package/dist/monitoring/QuotaExhaustionDetector.d.ts.map +1 -0
  956. package/dist/monitoring/QuotaExhaustionDetector.js +136 -0
  957. package/dist/monitoring/QuotaExhaustionDetector.js.map +1 -0
  958. package/dist/monitoring/QuotaManager.d.ts +191 -0
  959. package/dist/monitoring/QuotaManager.d.ts.map +1 -0
  960. package/dist/monitoring/QuotaManager.js +575 -0
  961. package/dist/monitoring/QuotaManager.js.map +1 -0
  962. package/dist/monitoring/QuotaNotifier.d.ts +38 -0
  963. package/dist/monitoring/QuotaNotifier.d.ts.map +1 -0
  964. package/dist/monitoring/QuotaNotifier.js +144 -0
  965. package/dist/monitoring/QuotaNotifier.js.map +1 -0
  966. package/dist/monitoring/QuotaTracker.d.ts +92 -0
  967. package/dist/monitoring/QuotaTracker.d.ts.map +1 -0
  968. package/dist/monitoring/QuotaTracker.js +239 -0
  969. package/dist/monitoring/QuotaTracker.js.map +1 -0
  970. package/dist/monitoring/ReflectionMetrics.d.ts +97 -0
  971. package/dist/monitoring/ReflectionMetrics.d.ts.map +1 -0
  972. package/dist/monitoring/ReflectionMetrics.js +170 -0
  973. package/dist/monitoring/ReflectionMetrics.js.map +1 -0
  974. package/dist/monitoring/SessionActivitySentinel.d.ts +95 -0
  975. package/dist/monitoring/SessionActivitySentinel.d.ts.map +1 -0
  976. package/dist/monitoring/SessionActivitySentinel.js +391 -0
  977. package/dist/monitoring/SessionActivitySentinel.js.map +1 -0
  978. package/dist/monitoring/SessionCredentialManager.d.ts +56 -0
  979. package/dist/monitoring/SessionCredentialManager.d.ts.map +1 -0
  980. package/dist/monitoring/SessionCredentialManager.js +91 -0
  981. package/dist/monitoring/SessionCredentialManager.js.map +1 -0
  982. package/dist/monitoring/SessionMigrator.d.ts +234 -0
  983. package/dist/monitoring/SessionMigrator.d.ts.map +1 -0
  984. package/dist/monitoring/SessionMigrator.js +604 -0
  985. package/dist/monitoring/SessionMigrator.js.map +1 -0
  986. package/dist/monitoring/SessionMonitor.d.ts +102 -0
  987. package/dist/monitoring/SessionMonitor.d.ts.map +1 -0
  988. package/dist/monitoring/SessionMonitor.js +238 -0
  989. package/dist/monitoring/SessionMonitor.js.map +1 -0
  990. package/dist/monitoring/SessionRecovery.d.ts +129 -0
  991. package/dist/monitoring/SessionRecovery.d.ts.map +1 -0
  992. package/dist/monitoring/SessionRecovery.js +496 -0
  993. package/dist/monitoring/SessionRecovery.js.map +1 -0
  994. package/dist/monitoring/SessionWatchdog.d.ts +138 -0
  995. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -0
  996. package/dist/monitoring/SessionWatchdog.js +549 -0
  997. package/dist/monitoring/SessionWatchdog.js.map +1 -0
  998. package/dist/monitoring/StallTriageNurse.d.ts +96 -0
  999. package/dist/monitoring/StallTriageNurse.d.ts.map +1 -0
  1000. package/dist/monitoring/StallTriageNurse.js +711 -0
  1001. package/dist/monitoring/StallTriageNurse.js.map +1 -0
  1002. package/dist/monitoring/StallTriageNurse.types.d.ts +124 -0
  1003. package/dist/monitoring/StallTriageNurse.types.d.ts.map +1 -0
  1004. package/dist/monitoring/StallTriageNurse.types.js +5 -0
  1005. package/dist/monitoring/StallTriageNurse.types.js.map +1 -0
  1006. package/dist/monitoring/SubagentTracker.d.ts +86 -0
  1007. package/dist/monitoring/SubagentTracker.d.ts.map +1 -0
  1008. package/dist/monitoring/SubagentTracker.js +199 -0
  1009. package/dist/monitoring/SubagentTracker.js.map +1 -0
  1010. package/dist/monitoring/SystemReviewer.d.ts +243 -0
  1011. package/dist/monitoring/SystemReviewer.d.ts.map +1 -0
  1012. package/dist/monitoring/SystemReviewer.js +697 -0
  1013. package/dist/monitoring/SystemReviewer.js.map +1 -0
  1014. package/dist/monitoring/TelemetryAuth.d.ts +64 -0
  1015. package/dist/monitoring/TelemetryAuth.d.ts.map +1 -0
  1016. package/dist/monitoring/TelemetryAuth.js +141 -0
  1017. package/dist/monitoring/TelemetryAuth.js.map +1 -0
  1018. package/dist/monitoring/TelemetryCollector.d.ts +95 -0
  1019. package/dist/monitoring/TelemetryCollector.d.ts.map +1 -0
  1020. package/dist/monitoring/TelemetryCollector.js +326 -0
  1021. package/dist/monitoring/TelemetryCollector.js.map +1 -0
  1022. package/dist/monitoring/TelemetryHeartbeat.d.ts +160 -0
  1023. package/dist/monitoring/TelemetryHeartbeat.d.ts.map +1 -0
  1024. package/dist/monitoring/TelemetryHeartbeat.js +450 -0
  1025. package/dist/monitoring/TelemetryHeartbeat.js.map +1 -0
  1026. package/dist/monitoring/TriageOrchestrator.d.ts +217 -0
  1027. package/dist/monitoring/TriageOrchestrator.d.ts.map +1 -0
  1028. package/dist/monitoring/TriageOrchestrator.js +801 -0
  1029. package/dist/monitoring/TriageOrchestrator.js.map +1 -0
  1030. package/dist/monitoring/WorktreeMonitor.d.ts +124 -0
  1031. package/dist/monitoring/WorktreeMonitor.d.ts.map +1 -0
  1032. package/dist/monitoring/WorktreeMonitor.js +379 -0
  1033. package/dist/monitoring/WorktreeMonitor.js.map +1 -0
  1034. package/dist/monitoring/crash-detector.d.ts +50 -0
  1035. package/dist/monitoring/crash-detector.d.ts.map +1 -0
  1036. package/dist/monitoring/crash-detector.js +224 -0
  1037. package/dist/monitoring/crash-detector.js.map +1 -0
  1038. package/dist/monitoring/jsonl-truncator.d.ts +44 -0
  1039. package/dist/monitoring/jsonl-truncator.d.ts.map +1 -0
  1040. package/dist/monitoring/jsonl-truncator.js +224 -0
  1041. package/dist/monitoring/jsonl-truncator.js.map +1 -0
  1042. package/dist/monitoring/probes/LifelineProbe.d.ts +38 -0
  1043. package/dist/monitoring/probes/LifelineProbe.d.ts.map +1 -0
  1044. package/dist/monitoring/probes/LifelineProbe.js +285 -0
  1045. package/dist/monitoring/probes/LifelineProbe.js.map +1 -0
  1046. package/dist/monitoring/probes/MessagingProbe.d.ts +23 -0
  1047. package/dist/monitoring/probes/MessagingProbe.d.ts.map +1 -0
  1048. package/dist/monitoring/probes/MessagingProbe.js +214 -0
  1049. package/dist/monitoring/probes/MessagingProbe.js.map +1 -0
  1050. package/dist/monitoring/probes/PlatformProbe.d.ts +15 -0
  1051. package/dist/monitoring/probes/PlatformProbe.d.ts.map +1 -0
  1052. package/dist/monitoring/probes/PlatformProbe.js +222 -0
  1053. package/dist/monitoring/probes/PlatformProbe.js.map +1 -0
  1054. package/dist/monitoring/probes/SchedulerProbe.d.ts +33 -0
  1055. package/dist/monitoring/probes/SchedulerProbe.d.ts.map +1 -0
  1056. package/dist/monitoring/probes/SchedulerProbe.js +196 -0
  1057. package/dist/monitoring/probes/SchedulerProbe.js.map +1 -0
  1058. package/dist/monitoring/probes/SessionProbe.d.ts +28 -0
  1059. package/dist/monitoring/probes/SessionProbe.d.ts.map +1 -0
  1060. package/dist/monitoring/probes/SessionProbe.js +234 -0
  1061. package/dist/monitoring/probes/SessionProbe.js.map +1 -0
  1062. package/dist/monitoring/stall-detector.d.ts +34 -0
  1063. package/dist/monitoring/stall-detector.d.ts.map +1 -0
  1064. package/dist/monitoring/stall-detector.js +151 -0
  1065. package/dist/monitoring/stall-detector.js.map +1 -0
  1066. package/dist/paste/PasteManager.d.ts +154 -0
  1067. package/dist/paste/PasteManager.d.ts.map +1 -0
  1068. package/dist/paste/PasteManager.js +524 -0
  1069. package/dist/paste/PasteManager.js.map +1 -0
  1070. package/dist/paste/TruncationDetector.d.ts +51 -0
  1071. package/dist/paste/TruncationDetector.d.ts.map +1 -0
  1072. package/dist/paste/TruncationDetector.js +220 -0
  1073. package/dist/paste/TruncationDetector.js.map +1 -0
  1074. package/dist/privacy/OutputPrivacyRouter.d.ts +65 -0
  1075. package/dist/privacy/OutputPrivacyRouter.d.ts.map +1 -0
  1076. package/dist/privacy/OutputPrivacyRouter.js +156 -0
  1077. package/dist/privacy/OutputPrivacyRouter.js.map +1 -0
  1078. package/dist/publishing/PrivateViewer.d.ts +63 -0
  1079. package/dist/publishing/PrivateViewer.d.ts.map +1 -0
  1080. package/dist/publishing/PrivateViewer.js +398 -0
  1081. package/dist/publishing/PrivateViewer.js.map +1 -0
  1082. package/dist/publishing/TelegraphService.d.ts +137 -0
  1083. package/dist/publishing/TelegraphService.d.ts.map +1 -0
  1084. package/dist/publishing/TelegraphService.js +410 -0
  1085. package/dist/publishing/TelegraphService.js.map +1 -0
  1086. package/dist/scaffold/bootstrap.d.ts +21 -0
  1087. package/dist/scaffold/bootstrap.d.ts.map +1 -0
  1088. package/dist/scaffold/bootstrap.js +125 -0
  1089. package/dist/scaffold/bootstrap.js.map +1 -0
  1090. package/dist/scaffold/templates.d.ts +47 -0
  1091. package/dist/scaffold/templates.d.ts.map +1 -0
  1092. package/dist/scaffold/templates.js +1506 -0
  1093. package/dist/scaffold/templates.js.map +1 -0
  1094. package/dist/scheduler/IntegrationGate.d.ts +81 -0
  1095. package/dist/scheduler/IntegrationGate.d.ts.map +1 -0
  1096. package/dist/scheduler/IntegrationGate.js +242 -0
  1097. package/dist/scheduler/IntegrationGate.js.map +1 -0
  1098. package/dist/scheduler/JobClaimManager.d.ts +137 -0
  1099. package/dist/scheduler/JobClaimManager.d.ts.map +1 -0
  1100. package/dist/scheduler/JobClaimManager.js +283 -0
  1101. package/dist/scheduler/JobClaimManager.js.map +1 -0
  1102. package/dist/scheduler/JobLoader.d.ts +28 -0
  1103. package/dist/scheduler/JobLoader.d.ts.map +1 -0
  1104. package/dist/scheduler/JobLoader.js +269 -0
  1105. package/dist/scheduler/JobLoader.js.map +1 -0
  1106. package/dist/scheduler/JobRunHistory.d.ts +180 -0
  1107. package/dist/scheduler/JobRunHistory.d.ts.map +1 -0
  1108. package/dist/scheduler/JobRunHistory.js +349 -0
  1109. package/dist/scheduler/JobRunHistory.js.map +1 -0
  1110. package/dist/scheduler/JobScheduler.d.ts +244 -0
  1111. package/dist/scheduler/JobScheduler.d.ts.map +1 -0
  1112. package/dist/scheduler/JobScheduler.js +1085 -0
  1113. package/dist/scheduler/JobScheduler.js.map +1 -0
  1114. package/dist/scheduler/SkipLedger.d.ts +65 -0
  1115. package/dist/scheduler/SkipLedger.d.ts.map +1 -0
  1116. package/dist/scheduler/SkipLedger.js +179 -0
  1117. package/dist/scheduler/SkipLedger.js.map +1 -0
  1118. package/dist/security/LLMSanitizer.d.ts +65 -0
  1119. package/dist/security/LLMSanitizer.d.ts.map +1 -0
  1120. package/dist/security/LLMSanitizer.js +153 -0
  1121. package/dist/security/LLMSanitizer.js.map +1 -0
  1122. package/dist/security/ManifestIntegrity.d.ts +72 -0
  1123. package/dist/security/ManifestIntegrity.d.ts.map +1 -0
  1124. package/dist/security/ManifestIntegrity.js +159 -0
  1125. package/dist/security/ManifestIntegrity.js.map +1 -0
  1126. package/dist/server/AgentServer.d.ts +134 -0
  1127. package/dist/server/AgentServer.d.ts.map +1 -0
  1128. package/dist/server/AgentServer.js +307 -0
  1129. package/dist/server/AgentServer.js.map +1 -0
  1130. package/dist/server/SecretDrop.d.ts +133 -0
  1131. package/dist/server/SecretDrop.d.ts.map +1 -0
  1132. package/dist/server/SecretDrop.js +473 -0
  1133. package/dist/server/SecretDrop.js.map +1 -0
  1134. package/dist/server/WebSocketManager.d.ts +80 -0
  1135. package/dist/server/WebSocketManager.d.ts.map +1 -0
  1136. package/dist/server/WebSocketManager.js +367 -0
  1137. package/dist/server/WebSocketManager.js.map +1 -0
  1138. package/dist/server/fileRoutes.d.ts +19 -0
  1139. package/dist/server/fileRoutes.d.ts.map +1 -0
  1140. package/dist/server/fileRoutes.js +578 -0
  1141. package/dist/server/fileRoutes.js.map +1 -0
  1142. package/dist/server/machineAuth.d.ts +87 -0
  1143. package/dist/server/machineAuth.d.ts.map +1 -0
  1144. package/dist/server/machineAuth.js +188 -0
  1145. package/dist/server/machineAuth.js.map +1 -0
  1146. package/dist/server/machineRoutes.d.ts +49 -0
  1147. package/dist/server/machineRoutes.d.ts.map +1 -0
  1148. package/dist/server/machineRoutes.js +305 -0
  1149. package/dist/server/machineRoutes.js.map +1 -0
  1150. package/dist/server/middleware.d.ts +32 -0
  1151. package/dist/server/middleware.d.ts.map +1 -0
  1152. package/dist/server/middleware.js +202 -0
  1153. package/dist/server/middleware.js.map +1 -0
  1154. package/dist/server/routes.d.ts +132 -0
  1155. package/dist/server/routes.d.ts.map +1 -0
  1156. package/dist/server/routes.js +8124 -0
  1157. package/dist/server/routes.js.map +1 -0
  1158. package/dist/threadline/A2AGateway.d.ts +184 -0
  1159. package/dist/threadline/A2AGateway.d.ts.map +1 -0
  1160. package/dist/threadline/A2AGateway.js +438 -0
  1161. package/dist/threadline/A2AGateway.js.map +1 -0
  1162. package/dist/threadline/AgentCard.d.ts +116 -0
  1163. package/dist/threadline/AgentCard.d.ts.map +1 -0
  1164. package/dist/threadline/AgentCard.js +212 -0
  1165. package/dist/threadline/AgentCard.js.map +1 -0
  1166. package/dist/threadline/AgentDiscovery.d.ts +156 -0
  1167. package/dist/threadline/AgentDiscovery.d.ts.map +1 -0
  1168. package/dist/threadline/AgentDiscovery.js +390 -0
  1169. package/dist/threadline/AgentDiscovery.js.map +1 -0
  1170. package/dist/threadline/AgentTrustManager.d.ts +190 -0
  1171. package/dist/threadline/AgentTrustManager.d.ts.map +1 -0
  1172. package/dist/threadline/AgentTrustManager.js +526 -0
  1173. package/dist/threadline/AgentTrustManager.js.map +1 -0
  1174. package/dist/threadline/ApprovalQueue.d.ts +71 -0
  1175. package/dist/threadline/ApprovalQueue.d.ts.map +1 -0
  1176. package/dist/threadline/ApprovalQueue.js +154 -0
  1177. package/dist/threadline/ApprovalQueue.js.map +1 -0
  1178. package/dist/threadline/AutonomyGate.d.ts +130 -0
  1179. package/dist/threadline/AutonomyGate.d.ts.map +1 -0
  1180. package/dist/threadline/AutonomyGate.js +267 -0
  1181. package/dist/threadline/AutonomyGate.js.map +1 -0
  1182. package/dist/threadline/CircuitBreaker.d.ts +89 -0
  1183. package/dist/threadline/CircuitBreaker.d.ts.map +1 -0
  1184. package/dist/threadline/CircuitBreaker.js +238 -0
  1185. package/dist/threadline/CircuitBreaker.js.map +1 -0
  1186. package/dist/threadline/ComputeMeter.d.ts +114 -0
  1187. package/dist/threadline/ComputeMeter.d.ts.map +1 -0
  1188. package/dist/threadline/ComputeMeter.js +350 -0
  1189. package/dist/threadline/ComputeMeter.js.map +1 -0
  1190. package/dist/threadline/ContentClassifier.d.ts +83 -0
  1191. package/dist/threadline/ContentClassifier.d.ts.map +1 -0
  1192. package/dist/threadline/ContentClassifier.js +201 -0
  1193. package/dist/threadline/ContentClassifier.js.map +1 -0
  1194. package/dist/threadline/ContextThreadMap.d.ts +103 -0
  1195. package/dist/threadline/ContextThreadMap.d.ts.map +1 -0
  1196. package/dist/threadline/ContextThreadMap.js +279 -0
  1197. package/dist/threadline/ContextThreadMap.js.map +1 -0
  1198. package/dist/threadline/DNSVerifier.d.ts +48 -0
  1199. package/dist/threadline/DNSVerifier.d.ts.map +1 -0
  1200. package/dist/threadline/DNSVerifier.js +138 -0
  1201. package/dist/threadline/DNSVerifier.js.map +1 -0
  1202. package/dist/threadline/DigestCollector.d.ts +70 -0
  1203. package/dist/threadline/DigestCollector.d.ts.map +1 -0
  1204. package/dist/threadline/DigestCollector.js +146 -0
  1205. package/dist/threadline/DigestCollector.js.map +1 -0
  1206. package/dist/threadline/HandshakeManager.d.ts +130 -0
  1207. package/dist/threadline/HandshakeManager.d.ts.map +1 -0
  1208. package/dist/threadline/HandshakeManager.js +402 -0
  1209. package/dist/threadline/HandshakeManager.js.map +1 -0
  1210. package/dist/threadline/InboundMessageGate.d.ts +80 -0
  1211. package/dist/threadline/InboundMessageGate.d.ts.map +1 -0
  1212. package/dist/threadline/InboundMessageGate.js +241 -0
  1213. package/dist/threadline/InboundMessageGate.js.map +1 -0
  1214. package/dist/threadline/InvitationManager.d.ts +91 -0
  1215. package/dist/threadline/InvitationManager.d.ts.map +1 -0
  1216. package/dist/threadline/InvitationManager.js +228 -0
  1217. package/dist/threadline/InvitationManager.js.map +1 -0
  1218. package/dist/threadline/ListenerSessionManager.d.ts +147 -0
  1219. package/dist/threadline/ListenerSessionManager.d.ts.map +1 -0
  1220. package/dist/threadline/ListenerSessionManager.js +326 -0
  1221. package/dist/threadline/ListenerSessionManager.js.map +1 -0
  1222. package/dist/threadline/MCPAuth.d.ts +98 -0
  1223. package/dist/threadline/MCPAuth.d.ts.map +1 -0
  1224. package/dist/threadline/MCPAuth.js +228 -0
  1225. package/dist/threadline/MCPAuth.js.map +1 -0
  1226. package/dist/threadline/OpenClawBridge.d.ts +143 -0
  1227. package/dist/threadline/OpenClawBridge.d.ts.map +1 -0
  1228. package/dist/threadline/OpenClawBridge.js +336 -0
  1229. package/dist/threadline/OpenClawBridge.js.map +1 -0
  1230. package/dist/threadline/OpenClawSkillManifest.d.ts +47 -0
  1231. package/dist/threadline/OpenClawSkillManifest.d.ts.map +1 -0
  1232. package/dist/threadline/OpenClawSkillManifest.js +148 -0
  1233. package/dist/threadline/OpenClawSkillManifest.js.map +1 -0
  1234. package/dist/threadline/RateLimiter.d.ts +105 -0
  1235. package/dist/threadline/RateLimiter.d.ts.map +1 -0
  1236. package/dist/threadline/RateLimiter.js +236 -0
  1237. package/dist/threadline/RateLimiter.js.map +1 -0
  1238. package/dist/threadline/RelayGroundingPreamble.d.ts +48 -0
  1239. package/dist/threadline/RelayGroundingPreamble.d.ts.map +1 -0
  1240. package/dist/threadline/RelayGroundingPreamble.js +68 -0
  1241. package/dist/threadline/RelayGroundingPreamble.js.map +1 -0
  1242. package/dist/threadline/SessionLifecycle.d.ts +136 -0
  1243. package/dist/threadline/SessionLifecycle.d.ts.map +1 -0
  1244. package/dist/threadline/SessionLifecycle.js +317 -0
  1245. package/dist/threadline/SessionLifecycle.js.map +1 -0
  1246. package/dist/threadline/ThreadResumeMap.d.ts +128 -0
  1247. package/dist/threadline/ThreadResumeMap.d.ts.map +1 -0
  1248. package/dist/threadline/ThreadResumeMap.js +324 -0
  1249. package/dist/threadline/ThreadResumeMap.js.map +1 -0
  1250. package/dist/threadline/ThreadlineBootstrap.d.ts +68 -0
  1251. package/dist/threadline/ThreadlineBootstrap.d.ts.map +1 -0
  1252. package/dist/threadline/ThreadlineBootstrap.js +293 -0
  1253. package/dist/threadline/ThreadlineBootstrap.js.map +1 -0
  1254. package/dist/threadline/ThreadlineCrypto.d.ts +53 -0
  1255. package/dist/threadline/ThreadlineCrypto.d.ts.map +1 -0
  1256. package/dist/threadline/ThreadlineCrypto.js +123 -0
  1257. package/dist/threadline/ThreadlineCrypto.js.map +1 -0
  1258. package/dist/threadline/ThreadlineEndpoints.d.ts +35 -0
  1259. package/dist/threadline/ThreadlineEndpoints.d.ts.map +1 -0
  1260. package/dist/threadline/ThreadlineEndpoints.js +313 -0
  1261. package/dist/threadline/ThreadlineEndpoints.js.map +1 -0
  1262. package/dist/threadline/ThreadlineMCPServer.d.ts +165 -0
  1263. package/dist/threadline/ThreadlineMCPServer.d.ts.map +1 -0
  1264. package/dist/threadline/ThreadlineMCPServer.js +885 -0
  1265. package/dist/threadline/ThreadlineMCPServer.js.map +1 -0
  1266. package/dist/threadline/ThreadlineRouter.d.ts +105 -0
  1267. package/dist/threadline/ThreadlineRouter.d.ts.map +1 -0
  1268. package/dist/threadline/ThreadlineRouter.js +323 -0
  1269. package/dist/threadline/ThreadlineRouter.js.map +1 -0
  1270. package/dist/threadline/TrustBootstrap.d.ts +92 -0
  1271. package/dist/threadline/TrustBootstrap.d.ts.map +1 -0
  1272. package/dist/threadline/TrustBootstrap.js +256 -0
  1273. package/dist/threadline/TrustBootstrap.js.map +1 -0
  1274. package/dist/threadline/adapters/AutoGenTool.d.ts +42 -0
  1275. package/dist/threadline/adapters/AutoGenTool.d.ts.map +1 -0
  1276. package/dist/threadline/adapters/AutoGenTool.js +145 -0
  1277. package/dist/threadline/adapters/AutoGenTool.js.map +1 -0
  1278. package/dist/threadline/adapters/CrewAITool.d.ts +31 -0
  1279. package/dist/threadline/adapters/CrewAITool.d.ts.map +1 -0
  1280. package/dist/threadline/adapters/CrewAITool.js +112 -0
  1281. package/dist/threadline/adapters/CrewAITool.js.map +1 -0
  1282. package/dist/threadline/adapters/LangGraphTool.d.ts +48 -0
  1283. package/dist/threadline/adapters/LangGraphTool.d.ts.map +1 -0
  1284. package/dist/threadline/adapters/LangGraphTool.js +153 -0
  1285. package/dist/threadline/adapters/LangGraphTool.js.map +1 -0
  1286. package/dist/threadline/adapters/RESTServer.d.ts +74 -0
  1287. package/dist/threadline/adapters/RESTServer.d.ts.map +1 -0
  1288. package/dist/threadline/adapters/RESTServer.js +291 -0
  1289. package/dist/threadline/adapters/RESTServer.js.map +1 -0
  1290. package/dist/threadline/adapters/index.d.ts +14 -0
  1291. package/dist/threadline/adapters/index.d.ts.map +1 -0
  1292. package/dist/threadline/adapters/index.js +10 -0
  1293. package/dist/threadline/adapters/index.js.map +1 -0
  1294. package/dist/threadline/client/IdentityManager.d.ts +40 -0
  1295. package/dist/threadline/client/IdentityManager.d.ts.map +1 -0
  1296. package/dist/threadline/client/IdentityManager.js +106 -0
  1297. package/dist/threadline/client/IdentityManager.js.map +1 -0
  1298. package/dist/threadline/client/MessageEncryptor.d.ts +63 -0
  1299. package/dist/threadline/client/MessageEncryptor.d.ts.map +1 -0
  1300. package/dist/threadline/client/MessageEncryptor.js +195 -0
  1301. package/dist/threadline/client/MessageEncryptor.js.map +1 -0
  1302. package/dist/threadline/client/RegistryRestClient.d.ts +46 -0
  1303. package/dist/threadline/client/RegistryRestClient.d.ts.map +1 -0
  1304. package/dist/threadline/client/RegistryRestClient.js +114 -0
  1305. package/dist/threadline/client/RegistryRestClient.js.map +1 -0
  1306. package/dist/threadline/client/RelayClient.d.ts +77 -0
  1307. package/dist/threadline/client/RelayClient.d.ts.map +1 -0
  1308. package/dist/threadline/client/RelayClient.js +249 -0
  1309. package/dist/threadline/client/RelayClient.js.map +1 -0
  1310. package/dist/threadline/client/ThreadlineClient.d.ts +117 -0
  1311. package/dist/threadline/client/ThreadlineClient.d.ts.map +1 -0
  1312. package/dist/threadline/client/ThreadlineClient.js +286 -0
  1313. package/dist/threadline/client/ThreadlineClient.js.map +1 -0
  1314. package/dist/threadline/client/index.d.ts +14 -0
  1315. package/dist/threadline/client/index.d.ts.map +1 -0
  1316. package/dist/threadline/client/index.js +9 -0
  1317. package/dist/threadline/client/index.js.map +1 -0
  1318. package/dist/threadline/index.d.ts +81 -0
  1319. package/dist/threadline/index.d.ts.map +1 -0
  1320. package/dist/threadline/index.js +57 -0
  1321. package/dist/threadline/index.js.map +1 -0
  1322. package/dist/threadline/mcp-stdio-entry.d.ts +24 -0
  1323. package/dist/threadline/mcp-stdio-entry.d.ts.map +1 -0
  1324. package/dist/threadline/mcp-stdio-entry.js +230 -0
  1325. package/dist/threadline/mcp-stdio-entry.js.map +1 -0
  1326. package/dist/threadline/relay/A2ABridge.d.ts +91 -0
  1327. package/dist/threadline/relay/A2ABridge.d.ts.map +1 -0
  1328. package/dist/threadline/relay/A2ABridge.js +457 -0
  1329. package/dist/threadline/relay/A2ABridge.js.map +1 -0
  1330. package/dist/threadline/relay/AbuseDetector.d.ts +131 -0
  1331. package/dist/threadline/relay/AbuseDetector.d.ts.map +1 -0
  1332. package/dist/threadline/relay/AbuseDetector.js +358 -0
  1333. package/dist/threadline/relay/AbuseDetector.js.map +1 -0
  1334. package/dist/threadline/relay/AdminServer.d.ts +55 -0
  1335. package/dist/threadline/relay/AdminServer.d.ts.map +1 -0
  1336. package/dist/threadline/relay/AdminServer.js +215 -0
  1337. package/dist/threadline/relay/AdminServer.js.map +1 -0
  1338. package/dist/threadline/relay/ConnectionManager.d.ts +86 -0
  1339. package/dist/threadline/relay/ConnectionManager.d.ts.map +1 -0
  1340. package/dist/threadline/relay/ConnectionManager.js +356 -0
  1341. package/dist/threadline/relay/ConnectionManager.js.map +1 -0
  1342. package/dist/threadline/relay/MessageRouter.d.ts +46 -0
  1343. package/dist/threadline/relay/MessageRouter.d.ts.map +1 -0
  1344. package/dist/threadline/relay/MessageRouter.js +138 -0
  1345. package/dist/threadline/relay/MessageRouter.js.map +1 -0
  1346. package/dist/threadline/relay/OfflineQueue.d.ts +87 -0
  1347. package/dist/threadline/relay/OfflineQueue.d.ts.map +1 -0
  1348. package/dist/threadline/relay/OfflineQueue.js +137 -0
  1349. package/dist/threadline/relay/OfflineQueue.js.map +1 -0
  1350. package/dist/threadline/relay/PresenceRegistry.d.ts +62 -0
  1351. package/dist/threadline/relay/PresenceRegistry.d.ts.map +1 -0
  1352. package/dist/threadline/relay/PresenceRegistry.js +148 -0
  1353. package/dist/threadline/relay/PresenceRegistry.js.map +1 -0
  1354. package/dist/threadline/relay/RegistryAuth.d.ts +45 -0
  1355. package/dist/threadline/relay/RegistryAuth.d.ts.map +1 -0
  1356. package/dist/threadline/relay/RegistryAuth.js +118 -0
  1357. package/dist/threadline/relay/RegistryAuth.js.map +1 -0
  1358. package/dist/threadline/relay/RegistryStore.d.ts +149 -0
  1359. package/dist/threadline/relay/RegistryStore.d.ts.map +1 -0
  1360. package/dist/threadline/relay/RegistryStore.js +542 -0
  1361. package/dist/threadline/relay/RegistryStore.js.map +1 -0
  1362. package/dist/threadline/relay/RelayMetrics.d.ts +62 -0
  1363. package/dist/threadline/relay/RelayMetrics.d.ts.map +1 -0
  1364. package/dist/threadline/relay/RelayMetrics.js +149 -0
  1365. package/dist/threadline/relay/RelayMetrics.js.map +1 -0
  1366. package/dist/threadline/relay/RelayRateLimiter.d.ts +58 -0
  1367. package/dist/threadline/relay/RelayRateLimiter.d.ts.map +1 -0
  1368. package/dist/threadline/relay/RelayRateLimiter.js +116 -0
  1369. package/dist/threadline/relay/RelayRateLimiter.js.map +1 -0
  1370. package/dist/threadline/relay/RelayServer.d.ts +94 -0
  1371. package/dist/threadline/relay/RelayServer.d.ts.map +1 -0
  1372. package/dist/threadline/relay/RelayServer.js +1049 -0
  1373. package/dist/threadline/relay/RelayServer.js.map +1 -0
  1374. package/dist/threadline/relay/index.d.ts +28 -0
  1375. package/dist/threadline/relay/index.d.ts.map +1 -0
  1376. package/dist/threadline/relay/index.js +17 -0
  1377. package/dist/threadline/relay/index.js.map +1 -0
  1378. package/dist/threadline/relay/types.d.ts +215 -0
  1379. package/dist/threadline/relay/types.d.ts.map +1 -0
  1380. package/dist/threadline/relay/types.js +21 -0
  1381. package/dist/threadline/relay/types.js.map +1 -0
  1382. package/dist/threadline/types.d.ts +39 -0
  1383. package/dist/threadline/types.d.ts.map +1 -0
  1384. package/dist/threadline/types.js +10 -0
  1385. package/dist/threadline/types.js.map +1 -0
  1386. package/dist/tunnel/TunnelManager.d.ts +113 -0
  1387. package/dist/tunnel/TunnelManager.d.ts.map +1 -0
  1388. package/dist/tunnel/TunnelManager.js +474 -0
  1389. package/dist/tunnel/TunnelManager.js.map +1 -0
  1390. package/dist/types/pipeline.d.ts +203 -0
  1391. package/dist/types/pipeline.d.ts.map +1 -0
  1392. package/dist/types/pipeline.js +152 -0
  1393. package/dist/types/pipeline.js.map +1 -0
  1394. package/dist/users/GdprCommands.d.ts +44 -0
  1395. package/dist/users/GdprCommands.d.ts.map +1 -0
  1396. package/dist/users/GdprCommands.js +153 -0
  1397. package/dist/users/GdprCommands.js.map +1 -0
  1398. package/dist/users/OnboardingGate.d.ts +107 -0
  1399. package/dist/users/OnboardingGate.d.ts.map +1 -0
  1400. package/dist/users/OnboardingGate.js +240 -0
  1401. package/dist/users/OnboardingGate.js.map +1 -0
  1402. package/dist/users/UserContextBuilder.d.ts +47 -0
  1403. package/dist/users/UserContextBuilder.d.ts.map +1 -0
  1404. package/dist/users/UserContextBuilder.js +174 -0
  1405. package/dist/users/UserContextBuilder.js.map +1 -0
  1406. package/dist/users/UserManager.d.ts +76 -0
  1407. package/dist/users/UserManager.d.ts.map +1 -0
  1408. package/dist/users/UserManager.js +213 -0
  1409. package/dist/users/UserManager.js.map +1 -0
  1410. package/dist/users/UserOnboarding.d.ts +145 -0
  1411. package/dist/users/UserOnboarding.d.ts.map +1 -0
  1412. package/dist/users/UserOnboarding.js +488 -0
  1413. package/dist/users/UserOnboarding.js.map +1 -0
  1414. package/dist/users/UserPropagator.d.ts +75 -0
  1415. package/dist/users/UserPropagator.d.ts.map +1 -0
  1416. package/dist/users/UserPropagator.js +145 -0
  1417. package/dist/users/UserPropagator.js.map +1 -0
  1418. package/dist/utils/jsonl-rotation.d.ts +27 -0
  1419. package/dist/utils/jsonl-rotation.d.ts.map +1 -0
  1420. package/dist/utils/jsonl-rotation.js +63 -0
  1421. package/dist/utils/jsonl-rotation.js.map +1 -0
  1422. package/dist/utils/privacy.d.ts +88 -0
  1423. package/dist/utils/privacy.d.ts.map +1 -0
  1424. package/dist/utils/privacy.js +182 -0
  1425. package/dist/utils/privacy.js.map +1 -0
  1426. package/dist/utils/sanitize.d.ts +81 -0
  1427. package/dist/utils/sanitize.d.ts.map +1 -0
  1428. package/dist/utils/sanitize.js +122 -0
  1429. package/dist/utils/sanitize.js.map +1 -0
  1430. package/package.json +1 -0
  1431. package/playbook-scripts/atomic_write.py +133 -0
  1432. package/playbook-scripts/bootstrap-manifest.json +92 -0
  1433. package/playbook-scripts/playbook-annotate-context.py +239 -0
  1434. package/playbook-scripts/playbook-assemble.py +385 -0
  1435. package/playbook-scripts/playbook-dashboard.py +242 -0
  1436. package/playbook-scripts/playbook-decay.py +377 -0
  1437. package/playbook-scripts/playbook-dedup-job.py +252 -0
  1438. package/playbook-scripts/playbook-dedup.py +341 -0
  1439. package/playbook-scripts/playbook-delta-validator.py +576 -0
  1440. package/playbook-scripts/playbook-dsar.py +291 -0
  1441. package/playbook-scripts/playbook-eval-log.py +425 -0
  1442. package/playbook-scripts/playbook-failsafe.py +513 -0
  1443. package/playbook-scripts/playbook-feedback-quarantine.py +335 -0
  1444. package/playbook-scripts/playbook-history.py +293 -0
  1445. package/playbook-scripts/playbook-hmac.py +224 -0
  1446. package/playbook-scripts/playbook-lifecycle.py +952 -0
  1447. package/playbook-scripts/playbook-manifest.py +458 -0
  1448. package/playbook-scripts/playbook-micro-eval.py +316 -0
  1449. package/playbook-scripts/playbook-migrate-lessons.py +396 -0
  1450. package/playbook-scripts/playbook-mount.py +393 -0
  1451. package/playbook-scripts/playbook-offline-adapt.py +323 -0
  1452. package/playbook-scripts/playbook-pii-screen.py +207 -0
  1453. package/playbook-scripts/playbook-reflector.py +266 -0
  1454. package/playbook-scripts/playbook-relevance.py +269 -0
  1455. package/playbook-scripts/playbook-retirement.py +365 -0
  1456. package/playbook-scripts/playbook-schema-validate.py +267 -0
  1457. package/playbook-scripts/playbook-scratchpad.py +346 -0
  1458. package/playbook-scripts/playbook-semantic-verify.py +280 -0
  1459. package/playbook-scripts/playbook-spawn-contract.py +341 -0
  1460. package/playbook-scripts/playbook-token-reestimate.py +248 -0
  1461. package/playbook-scripts/playbook-verify.py +357 -0
  1462. package/playbook-scripts/playbook_backend.py +249 -0
  1463. package/playbook-scripts/playbook_paths.py +232 -0
  1464. package/playbook-scripts/schemas/context-delta.schema.json +137 -0
  1465. package/playbook-scripts/schemas/context-manifest.schema.json +200 -0
  1466. package/playbook-scripts/schemas/playbook-config.schema.json +184 -0
  1467. package/scripts/analyze-release.js +752 -0
  1468. package/scripts/check-upgrade-guide.js +373 -0
  1469. package/scripts/collect-metrics.py +248 -0
  1470. package/scripts/demo-two-agents.mjs +187 -0
  1471. package/scripts/fix-better-sqlite3.cjs +100 -0
  1472. package/scripts/generate-builtin-manifest.cjs +440 -0
  1473. package/scripts/pre-push-gate.js +177 -0
  1474. package/scripts/relay-entrypoint.mjs +18 -0
  1475. package/scripts/seed-registry.mjs +258 -0
  1476. package/scripts/telemetry-worker/worker.js +776 -0
  1477. package/scripts/telemetry-worker/wrangler.toml +7 -0
  1478. package/scripts/test-bootstrap-relay.mjs +90 -0
  1479. package/scripts/test-multi-agent-relay.mjs +395 -0
  1480. package/scripts/test-relay-cloud.mjs +389 -0
  1481. package/scripts/test-relay-live.mjs +550 -0
  1482. package/src/data/builtin-manifest.json +1463 -0
  1483. package/src/data/http-hook-templates.ts +81 -0
  1484. package/src/templates/hooks/compaction-recovery.sh +371 -0
  1485. package/src/templates/hooks/dangerous-command-guard.sh +100 -0
  1486. package/src/templates/hooks/free-text-guard.sh +96 -0
  1487. package/src/templates/hooks/grounding-before-messaging.sh +52 -0
  1488. package/src/templates/hooks/session-start.sh +339 -0
  1489. package/src/templates/hooks/settings-template.json +142 -0
  1490. package/src/templates/hooks/slack-channel-context.sh +98 -0
  1491. package/src/templates/hooks/telegram-topic-context.sh +117 -0
  1492. package/src/templates/scripts/convergence-check.sh +99 -0
  1493. package/src/templates/scripts/git-sync-gate.sh +89 -0
  1494. package/src/templates/scripts/health-watchdog.sh +63 -0
  1495. package/src/templates/scripts/serendipity-capture.sh +345 -0
  1496. package/src/templates/scripts/slack-reply.sh +74 -0
  1497. package/src/templates/scripts/smart-fetch.py +215 -0
  1498. package/src/templates/scripts/telegram-reply.sh +67 -0
  1499. package/src/templates/scripts/whatsapp-reply.sh +68 -0
  1500. package/upgrades/0.10.0.md +254 -0
  1501. package/upgrades/0.10.1.md +47 -0
  1502. package/upgrades/0.10.2.md +26 -0
  1503. package/upgrades/0.10.3.md +23 -0
  1504. package/upgrades/0.10.4.md +26 -0
  1505. package/upgrades/0.10.5.md +19 -0
  1506. package/upgrades/0.10.6.md +35 -0
  1507. package/upgrades/0.10.7.md +48 -0
  1508. package/upgrades/0.10.8.md +53 -0
  1509. package/upgrades/0.10.9.md +21 -0
  1510. package/upgrades/0.11.0.md +146 -0
  1511. package/upgrades/0.12.0.md +31 -0
  1512. package/upgrades/0.12.1.md +21 -0
  1513. package/upgrades/0.12.10.md +26 -0
  1514. package/upgrades/0.12.11.md +23 -0
  1515. package/upgrades/0.12.12.md +23 -0
  1516. package/upgrades/0.12.13.md +19 -0
  1517. package/upgrades/0.12.14.md +21 -0
  1518. package/upgrades/0.12.15.md +26 -0
  1519. package/upgrades/0.12.16.md +33 -0
  1520. package/upgrades/0.12.17.md +38 -0
  1521. package/upgrades/0.12.18.md +27 -0
  1522. package/upgrades/0.12.19.md +31 -0
  1523. package/upgrades/0.12.2.md +27 -0
  1524. package/upgrades/0.12.20.md +24 -0
  1525. package/upgrades/0.12.21.md +28 -0
  1526. package/upgrades/0.12.22.md +23 -0
  1527. package/upgrades/0.12.23.md +44 -0
  1528. package/upgrades/0.12.24.md +24 -0
  1529. package/upgrades/0.12.25.md +55 -0
  1530. package/upgrades/0.12.26.md +31 -0
  1531. package/upgrades/0.12.27.md +19 -0
  1532. package/upgrades/0.12.28.md +19 -0
  1533. package/upgrades/0.12.29.md +42 -0
  1534. package/upgrades/0.12.3.md +22 -0
  1535. package/upgrades/0.12.31.md +24 -0
  1536. package/upgrades/0.12.32.md +34 -0
  1537. package/upgrades/0.12.33.md +62 -0
  1538. package/upgrades/0.12.34.md +59 -0
  1539. package/upgrades/0.12.4.md +19 -0
  1540. package/upgrades/0.12.5.md +31 -0
  1541. package/upgrades/0.12.6.md +34 -0
  1542. package/upgrades/0.12.7.md +24 -0
  1543. package/upgrades/0.12.8.md +28 -0
  1544. package/upgrades/0.12.9.md +30 -0
  1545. package/upgrades/0.13.0.md +26 -0
  1546. package/upgrades/0.14.0.md +75 -0
  1547. package/upgrades/0.14.1.md +41 -0
  1548. package/upgrades/0.15.0.md +59 -0
  1549. package/upgrades/0.16.0.md +61 -0
  1550. package/upgrades/0.17.0.md +88 -0
  1551. package/upgrades/0.17.10.md +23 -0
  1552. package/upgrades/0.17.11.md +25 -0
  1553. package/upgrades/0.17.12.md +43 -0
  1554. package/upgrades/0.17.13.md +24 -0
  1555. package/upgrades/0.17.14.md +26 -0
  1556. package/upgrades/0.17.2.md +42 -0
  1557. package/upgrades/0.17.3.md +37 -0
  1558. package/upgrades/0.17.4.md +27 -0
  1559. package/upgrades/0.17.5.md +32 -0
  1560. package/upgrades/0.17.6.md +32 -0
  1561. package/upgrades/0.17.7.md +39 -0
  1562. package/upgrades/0.17.8.md +34 -0
  1563. package/upgrades/0.17.9.md +25 -0
  1564. package/upgrades/0.18.1.md +34 -0
  1565. package/upgrades/0.18.2.md +29 -0
  1566. package/upgrades/0.18.3.md +26 -0
  1567. package/upgrades/0.18.4.md +28 -0
  1568. package/upgrades/0.18.5.md +25 -0
  1569. package/upgrades/0.18.6.md +25 -0
  1570. package/upgrades/0.18.7.md +30 -0
  1571. package/upgrades/0.19.0.md +136 -0
  1572. package/upgrades/0.19.1.md +27 -0
  1573. package/upgrades/0.19.2.md +27 -0
  1574. package/upgrades/0.19.3.md +32 -0
  1575. package/upgrades/0.19.4.md +19 -0
  1576. package/upgrades/0.19.6.md +17 -0
  1577. package/upgrades/0.19.7.md +33 -0
  1578. package/upgrades/0.20.0.md +54 -0
  1579. package/upgrades/0.21.1.md +55 -0
  1580. package/upgrades/0.21.2.md +48 -0
  1581. package/upgrades/0.21.3.md +29 -0
  1582. package/upgrades/0.21.4.md +33 -0
  1583. package/upgrades/0.22.0.md +114 -0
  1584. package/upgrades/0.23.0.md +81 -0
  1585. package/upgrades/0.23.1.md +28 -0
  1586. package/upgrades/0.23.10.md +19 -0
  1587. package/upgrades/0.23.11.md +21 -0
  1588. package/upgrades/0.23.12.md +30 -0
  1589. package/upgrades/0.23.13.md +25 -0
  1590. package/upgrades/0.23.14.md +23 -0
  1591. package/upgrades/0.23.15.md +30 -0
  1592. package/upgrades/0.23.16.md +21 -0
  1593. package/upgrades/0.23.17.md +23 -0
  1594. package/upgrades/0.23.18.md +41 -0
  1595. package/upgrades/0.23.2.md +32 -0
  1596. package/upgrades/0.23.4.md +21 -0
  1597. package/upgrades/0.23.6.md +19 -0
  1598. package/upgrades/0.23.7.md +33 -0
  1599. package/upgrades/0.23.8.md +38 -0
  1600. package/upgrades/0.23.9.md +35 -0
  1601. package/upgrades/0.24.1.md +32 -0
  1602. package/upgrades/0.24.10.md +23 -0
  1603. package/upgrades/0.24.12.md +17 -0
  1604. package/upgrades/0.24.13.md +16 -0
  1605. package/upgrades/0.24.14.md +26 -0
  1606. package/upgrades/0.24.15.md +49 -0
  1607. package/upgrades/0.24.16.md +48 -0
  1608. package/upgrades/0.24.17.md +40 -0
  1609. package/upgrades/0.24.18-beta.0.md +35 -0
  1610. package/upgrades/0.24.18.md +35 -0
  1611. package/upgrades/0.24.19.md +21 -0
  1612. package/upgrades/0.24.2.md +13 -0
  1613. package/upgrades/0.24.20.md +45 -0
  1614. package/upgrades/0.24.21.md +25 -0
  1615. package/upgrades/0.24.22.md +35 -0
  1616. package/upgrades/0.24.23.md +17 -0
  1617. package/upgrades/0.24.24.md +15 -0
  1618. package/upgrades/0.24.25.md +15 -0
  1619. package/upgrades/0.24.26.md +15 -0
  1620. package/upgrades/0.24.27.md +17 -0
  1621. package/upgrades/0.24.28.md +35 -0
  1622. package/upgrades/0.24.29.md +15 -0
  1623. package/upgrades/0.24.30.md +40 -0
  1624. package/upgrades/0.24.31.md +45 -0
  1625. package/upgrades/0.24.32.md +19 -0
  1626. package/upgrades/0.24.33.md +35 -0
  1627. package/upgrades/0.24.34.md +29 -0
  1628. package/upgrades/0.24.4.md +19 -0
  1629. package/upgrades/0.24.5.md +20 -0
  1630. package/upgrades/0.25.0.md +34 -0
  1631. package/upgrades/0.25.1.md +24 -0
  1632. package/upgrades/0.25.10.md +26 -0
  1633. package/upgrades/0.25.2.md +23 -0
  1634. package/upgrades/0.25.3.md +25 -0
  1635. package/upgrades/0.25.4.md +24 -0
  1636. package/upgrades/0.25.5.md +19 -0
  1637. package/upgrades/0.25.6.md +35 -0
  1638. package/upgrades/0.25.7.md +18 -0
  1639. package/upgrades/0.25.8.md +24 -0
  1640. package/upgrades/0.25.9.md +19 -0
  1641. package/upgrades/0.26.0.md +23 -0
  1642. package/upgrades/0.26.1.md +22 -0
  1643. package/upgrades/0.26.2.md +15 -0
  1644. package/upgrades/0.8.12.md +49 -0
  1645. package/upgrades/0.8.13.md +38 -0
  1646. package/upgrades/0.8.17.md +36 -0
  1647. package/upgrades/0.8.22.md +43 -0
  1648. package/upgrades/0.8.23.md +106 -0
  1649. package/upgrades/0.9.1.md +91 -0
  1650. package/upgrades/0.9.10.md +40 -0
  1651. package/upgrades/0.9.11.md +77 -0
  1652. package/upgrades/0.9.12.md +42 -0
  1653. package/upgrades/0.9.13.md +55 -0
  1654. package/upgrades/0.9.14.md +23 -0
  1655. package/upgrades/0.9.15.md +106 -0
  1656. package/upgrades/0.9.16.md +37 -0
  1657. package/upgrades/0.9.17.md +15 -0
  1658. package/upgrades/0.9.19.md +17 -0
  1659. package/upgrades/0.9.20.md +24 -0
  1660. package/upgrades/0.9.21.md +37 -0
  1661. package/upgrades/0.9.22.md +41 -0
  1662. package/upgrades/0.9.23.md +37 -0
  1663. package/upgrades/0.9.24.md +46 -0
  1664. package/upgrades/0.9.25.md +37 -0
  1665. package/upgrades/0.9.28.md +20 -0
  1666. package/upgrades/0.9.29.md +34 -0
  1667. package/upgrades/0.9.32.md +30 -0
  1668. package/upgrades/0.9.36.md +27 -0
  1669. package/upgrades/0.9.8.md +125 -0
  1670. package/upgrades/0.9.9.md +34 -0
  1671. package/upgrades/NEXT.md +35 -0
@@ -0,0 +1,2159 @@
1
+ /**
2
+ * Core type definitions for instar.
3
+ *
4
+ * These types define the contracts between all modules.
5
+ * Everything flows from these — sessions, jobs, users, messaging.
6
+ */
7
+ export interface Session {
8
+ id: string;
9
+ name: string;
10
+ status: SessionStatus;
11
+ /** The job that spawned this session, if any */
12
+ jobSlug?: string;
13
+ /** tmux session name */
14
+ tmuxSession: string;
15
+ /** When the session was created */
16
+ startedAt: string;
17
+ /** When the session ended (if completed) */
18
+ endedAt?: string;
19
+ /** User who triggered the session, if any */
20
+ triggeredBy?: string;
21
+ /** Model to use for this session */
22
+ model?: ModelTier;
23
+ /** The initial prompt/instruction sent to Claude */
24
+ prompt?: string;
25
+ /** Maximum duration in minutes before the session is killed */
26
+ maxDurationMinutes?: number;
27
+ /** Claude Code's own session UUID (from hook events). Populated lazily on first hook event. */
28
+ claudeSessionId?: string;
29
+ }
30
+ export type SessionStatus = 'starting' | 'running' | 'completed' | 'failed' | 'killed';
31
+ export type ModelTier = 'opus' | 'sonnet' | 'haiku';
32
+ export interface SessionManagerConfig {
33
+ /** Path to tmux binary */
34
+ tmuxPath: string;
35
+ /** Path to claude CLI binary */
36
+ claudePath: string;
37
+ /** Project directory (where CLAUDE.md lives) */
38
+ projectDir: string;
39
+ /** Maximum concurrent sessions */
40
+ maxSessions: number;
41
+ /** Protected session names that should never be reaped */
42
+ protectedSessions: string[];
43
+ /** Patterns in tmux output that indicate session completion */
44
+ completionPatterns: string[];
45
+ /** Auth token for the Instar server — passed to sessions as INSTAR_AUTH_TOKEN
46
+ * so HTTP hooks can authenticate when posting events back to the server. */
47
+ authToken?: string;
48
+ /** Server port — used to construct INSTAR_SERVER_URL for HTTP hooks */
49
+ port?: number;
50
+ }
51
+ export interface JobDefinition {
52
+ slug: string;
53
+ name: string;
54
+ description: string;
55
+ /** Cron expression (e.g., "0 0/4 * * *" for every 4 hours) */
56
+ schedule: string;
57
+ /** Priority level — higher priority jobs run first and survive quota pressure */
58
+ priority: JobPriority;
59
+ /** Expected duration in minutes (for scheduling decisions) */
60
+ expectedDurationMinutes: number;
61
+ /** Model tier to use */
62
+ model: ModelTier;
63
+ /** Whether this job is currently enabled */
64
+ enabled: boolean;
65
+ /** The skill or prompt to execute */
66
+ execute: JobExecution;
67
+ /** Pre-flight gate command — runs before spawning a session.
68
+ * If the command exits non-zero, the job is skipped (nothing to do).
69
+ * Zero-token pre-screening that prevents unnecessary Claude sessions.
70
+ * Example: `curl -sf http://localhost:3000/updates | python3 -c "import sys,json; exit(0 if json.load(sys.stdin).get('updateAvailable') else 1)"`
71
+ */
72
+ gate?: string;
73
+ /** Tags for filtering/grouping */
74
+ tags?: string[];
75
+ /** Telegram topic ID this job reports to (auto-created if not set) */
76
+ topicId?: number;
77
+ /** Controls when this job sends Telegram notifications.
78
+ * - true: always notify on completion (legacy behavior)
79
+ * - false: never notify (no topic created)
80
+ * - 'on-alert': only notify on failure or when session signals [ATTENTION] (DEFAULT)
81
+ * When undefined, defaults to 'on-alert' — jobs are quiet unless they have
82
+ * something that needs the user's attention. */
83
+ telegramNotify?: boolean | 'on-alert';
84
+ /** Grounding configuration — what context this job needs at session start */
85
+ grounding?: JobGrounding;
86
+ /** LLM supervision tier — see docs/LLM-SUPERVISED-EXECUTION.md */
87
+ supervision?: SupervisionTier;
88
+ /** Living Skills — opt-in execution journaling and pattern detection (PROP-229) */
89
+ livingSkills?: LivingSkillsConfig;
90
+ /** Machine scope — restrict this job to specific machines.
91
+ * Values can be machine IDs (m_...) or machine names (case-insensitive).
92
+ * If omitted or empty, the job runs on ALL machines (default behavior).
93
+ * Example: ["m_abc123...", "justins-macbook"] */
94
+ machines?: string[];
95
+ /** Common blockers — pre-confirmed resolution patterns for this job.
96
+ * Injected into working memory at session start and used by the
97
+ * EscalationResolutionReviewer to catch unnecessary human escalations. */
98
+ commonBlockers?: Record<string, CommonBlocker>;
99
+ }
100
+ /** A pre-confirmed resolution for a common blocker pattern. */
101
+ export interface CommonBlocker {
102
+ /** Human-readable description of the blocker pattern */
103
+ description: string;
104
+ /** How to resolve this blocker without human intervention */
105
+ resolution: string;
106
+ /** Confirmation status: 'confirmed' means tested and working */
107
+ status?: 'confirmed' | 'pending' | 'expired';
108
+ /** Tools needed to execute the resolution */
109
+ toolsNeeded?: string[];
110
+ /** Credential sources needed (string or array) */
111
+ credentials?: string | string[];
112
+ /** ISO timestamp when this blocker resolution was last confirmed */
113
+ confirmedAt?: string;
114
+ /** ISO timestamp after which this resolution should be re-verified */
115
+ expiresAt?: string;
116
+ /** ISO timestamp when this blocker was last used */
117
+ lastUsedAt?: string;
118
+ /** Number of times this resolution has been successfully applied */
119
+ successCount?: number;
120
+ /** Who resolved this blocker ('agent' | 'research-agent' | 'human') */
121
+ resolvedBy?: string;
122
+ /** Session ID that added this blocker (for learning loop provenance) */
123
+ addedFrom?: string;
124
+ /** ISO timestamp when this blocker was added */
125
+ addedAt?: string;
126
+ }
127
+ /** Machine-readable description of what an agent CAN do. */
128
+ export interface CapabilityRegistry {
129
+ /** Authentication methods available, keyed by service name */
130
+ authentication?: Record<string, {
131
+ tool: string;
132
+ platforms: string[];
133
+ }>;
134
+ /** Tools available to the agent, keyed by tool category */
135
+ tools?: Record<string, {
136
+ tool: string;
137
+ capabilities: string[];
138
+ }>;
139
+ /** Accounts/platforms the agent has access to, keyed by platform */
140
+ accountsOwned?: Record<string, {
141
+ handle?: string;
142
+ authMethod: string;
143
+ }>;
144
+ /** Credential infrastructure availability */
145
+ credentials?: {
146
+ hasEnvFile?: boolean;
147
+ hasSecretStore?: boolean;
148
+ hasBitwarden?: boolean;
149
+ };
150
+ }
151
+ export interface JobGrounding {
152
+ /** Whether this job requires identity grounding before execution */
153
+ requiresIdentity: boolean;
154
+ /** Whether this job processes external/untrusted input (requires security screening) */
155
+ processesExternalInput?: boolean;
156
+ /** Additional context files to inject at job start (relative to .instar/) */
157
+ contextFiles?: string[];
158
+ /** Custom grounding questions the agent must answer before proceeding */
159
+ questions?: string[];
160
+ }
161
+ /**
162
+ * LLM-Supervised Execution Standard — supervision tier for jobs.
163
+ *
164
+ * Every critical pipeline should have at minimum Tier 1 supervision.
165
+ * See docs/LLM-SUPERVISED-EXECUTION.md for the full standard.
166
+ *
167
+ * - tier0: Raw programmatic — no LLM validation. Fast, cheap, silent failures.
168
+ * - tier1: LLM-supervised — lightweight model (Haiku) validates each step. Observed failures.
169
+ * - tier2: Full intelligent — capable model (Sonnet/Opus) handles reasoning. Handled failures.
170
+ */
171
+ export type SupervisionTier = 'tier0' | 'tier1' | 'tier2';
172
+ export type JobPriority = 'critical' | 'high' | 'medium' | 'low';
173
+ export interface JobExecution {
174
+ /** Type of execution */
175
+ type: 'skill' | 'prompt' | 'script';
176
+ /** The skill name, prompt text, or script path */
177
+ value: string;
178
+ /** Additional arguments */
179
+ args?: string;
180
+ }
181
+ export interface JobState {
182
+ slug: string;
183
+ lastRun?: string;
184
+ lastResult?: 'success' | 'failure' | 'timeout' | 'pending';
185
+ /** Error message from the last failure (cleared on success) */
186
+ lastError?: string;
187
+ /** Handoff notes from the last successful run — claims to verify, not facts */
188
+ lastHandoff?: string;
189
+ nextScheduled?: string;
190
+ consecutiveFailures: number;
191
+ }
192
+ export interface JobSchedulerConfig {
193
+ /** Path to jobs definition file */
194
+ jobsFile: string;
195
+ /** Whether the scheduler is active */
196
+ enabled: boolean;
197
+ /** Maximum parallel job sessions */
198
+ maxParallelJobs: number;
199
+ /** Quota thresholds for load shedding */
200
+ quotaThresholds: {
201
+ /** Below this: all jobs run */
202
+ normal: number;
203
+ /** Above this: only high+ priority */
204
+ elevated: number;
205
+ /** Above this: only critical */
206
+ critical: number;
207
+ /** Above this: no jobs */
208
+ shutdown: number;
209
+ };
210
+ }
211
+ export interface UserProfile {
212
+ id: string;
213
+ name: string;
214
+ /** Communication channels this user is reachable on */
215
+ channels: UserChannel[];
216
+ /** What this user is allowed to do */
217
+ permissions: string[];
218
+ /** How the agent should interact with this user */
219
+ preferences: UserPreferences;
220
+ /** Interaction history summary (auto-generated from conversations) */
221
+ context?: string;
222
+ /** Short bio or description provided during onboarding */
223
+ bio?: string;
224
+ /** User's interests or topics they care about */
225
+ interests?: string[];
226
+ /** How this user relates to the agent/project (e.g., "project lead", "beta tester") */
227
+ relationshipContext?: string;
228
+ /** Custom profile fields defined by agent's onboarding config */
229
+ customFields?: Record<string, string>;
230
+ /** Consent record (GDPR compliance) */
231
+ consent?: ConsentRecord;
232
+ /** What data categories are stored for this user */
233
+ dataCollected?: DataCollectedManifest;
234
+ /** Whether this user's Telegram topic is pending creation */
235
+ pendingTelegramTopic?: boolean;
236
+ /** ISO timestamp of when the user was created */
237
+ createdAt?: string;
238
+ /** Telegram numeric user ID (canonical identifier for identity binding) */
239
+ telegramUserId?: number;
240
+ }
241
+ export interface UserChannel {
242
+ /** Channel type (telegram, slack, discord, email, etc.) */
243
+ type: string;
244
+ /** Channel-specific identifier (topic ID, Slack user ID, email address, etc.) */
245
+ identifier: string;
246
+ }
247
+ export interface UserPreferences {
248
+ /** Communication style (e.g., "technical and direct", "prefers explanations") */
249
+ style?: string;
250
+ /** Whether to auto-execute or confirm with this user */
251
+ autonomyLevel?: 'full' | 'confirm-destructive' | 'confirm-all';
252
+ /** Timezone for scheduling */
253
+ timezone?: string;
254
+ }
255
+ /**
256
+ * Structured user context block for session injection.
257
+ * This is what gets injected into the session prompt so the agent
258
+ * knows who it's talking to. Bounded by maxContextTokens.
259
+ *
260
+ * CRITICAL: permissions are injected as structured data that the
261
+ * LLM cannot override via social engineering (Gap 8 requirement).
262
+ */
263
+ export interface UserContextBlock {
264
+ /** User's display name */
265
+ name: string;
266
+ /** User's unique ID */
267
+ userId: string;
268
+ /** Structured permissions (NOT natural language — cannot be overridden) */
269
+ permissions: string[];
270
+ /** Communication preferences */
271
+ preferences?: {
272
+ style?: string;
273
+ autonomyLevel?: string;
274
+ timezone?: string;
275
+ };
276
+ /** Short bio */
277
+ bio?: string;
278
+ /** Interests */
279
+ interests?: string[];
280
+ /** Relationship to agent/project */
281
+ relationshipContext?: string;
282
+ /** Interaction history summary */
283
+ context?: string;
284
+ /** Custom fields from agent-specific onboarding */
285
+ customFields?: Record<string, string>;
286
+ }
287
+ export interface Message {
288
+ /** Unique message ID */
289
+ id: string;
290
+ /** User who sent the message */
291
+ userId: string;
292
+ /** The message content */
293
+ content: string;
294
+ /** Channel the message came from */
295
+ channel: UserChannel;
296
+ /** When the message was received */
297
+ receivedAt: string;
298
+ /** Message metadata (platform-specific) */
299
+ metadata?: Record<string, unknown>;
300
+ }
301
+ export interface OutgoingMessage {
302
+ /** User to send to */
303
+ userId: string;
304
+ /** Message content */
305
+ content: string;
306
+ /** Specific channel to use (optional — uses default if omitted) */
307
+ channel?: UserChannel;
308
+ }
309
+ /**
310
+ * Messaging adapter interface.
311
+ * Implement this for each platform (Telegram, Slack, Discord, etc.)
312
+ */
313
+ export interface MessagingAdapter {
314
+ /** Platform name (e.g., "telegram", "slack") */
315
+ platform: string;
316
+ /** Start listening for messages */
317
+ start(): Promise<void>;
318
+ /** Stop listening */
319
+ stop(): Promise<void>;
320
+ /** Send a message to a user. Returns platform-specific delivery info. */
321
+ send(message: OutgoingMessage): Promise<void | unknown>;
322
+ /** Register a handler for incoming messages */
323
+ onMessage(handler: (message: Message) => Promise<void>): void;
324
+ /** Resolve a platform-specific identifier to a user ID */
325
+ resolveUser(channelIdentifier: string): Promise<string | null>;
326
+ }
327
+ export interface QuotaState {
328
+ /** Current weekly usage percentage (0-100) */
329
+ usagePercent: number;
330
+ /** 5-hour rolling rate limit utilization (0-100), if available */
331
+ fiveHourPercent?: number;
332
+ /** When usage data was last updated */
333
+ lastUpdated: string;
334
+ /** Per-account breakdown if multi-account */
335
+ accounts?: AccountQuota[];
336
+ /** Recommended action based on usage */
337
+ recommendation?: 'normal' | 'reduce' | 'critical' | 'stop';
338
+ }
339
+ export interface AccountQuota {
340
+ email: string;
341
+ usagePercent: number;
342
+ /** 5-hour rolling rate limit utilization for this account */
343
+ fiveHourPercent?: number;
344
+ isActive: boolean;
345
+ lastUpdated: string;
346
+ }
347
+ /** Cause of a session's death, as classified by QuotaExhaustionDetector */
348
+ export type SessionDeathCause = 'quota_exhaustion' | 'context_exhausted' | 'crash' | 'timeout' | 'normal_exit' | 'unknown';
349
+ export interface SessionDeathClassification {
350
+ cause: SessionDeathCause;
351
+ confidence: 'high' | 'medium' | 'low';
352
+ detail: string;
353
+ }
354
+ export interface HealthStatus {
355
+ status: 'healthy' | 'degraded' | 'unhealthy';
356
+ components: Record<string, ComponentHealth>;
357
+ timestamp: string;
358
+ }
359
+ export interface ComponentHealth {
360
+ status: 'healthy' | 'degraded' | 'unhealthy';
361
+ message?: string;
362
+ lastCheck: string;
363
+ }
364
+ /**
365
+ * Optional LLM intelligence for judgment calls.
366
+ *
367
+ * Any module that makes decisions beyond simple lookups can declare
368
+ * `intelligence?: IntelligenceProvider` in its config. This is the
369
+ * structural pattern that prevents defaulting to brittle heuristics.
370
+ *
371
+ * The contract: heuristics narrow candidates, the provider decides.
372
+ * When no provider is configured, modules fall back to heuristic-only
373
+ * behavior — functional but less accurate.
374
+ *
375
+ * Born from the "heuristics are pre-filters, not decision-makers" lesson.
376
+ */
377
+ export interface IntelligenceProvider {
378
+ /**
379
+ * Ask the LLM to evaluate a judgment call.
380
+ * Returns a structured response that the caller parses.
381
+ *
382
+ * @param prompt - The judgment to make, with full context
383
+ * @param options - Optional configuration for this call
384
+ * @returns The LLM's response text
385
+ */
386
+ evaluate(prompt: string, options?: IntelligenceOptions): Promise<string>;
387
+ }
388
+ export interface IntelligenceOptions {
389
+ /** Model tier preference (implementations may override based on availability) */
390
+ model?: 'fast' | 'balanced' | 'capable';
391
+ /** Maximum tokens for the response */
392
+ maxTokens?: number;
393
+ /** Temperature (0-1, lower = more deterministic) */
394
+ temperature?: number;
395
+ }
396
+ export interface RelationshipRecord {
397
+ /** Unique identifier for this person */
398
+ id: string;
399
+ /** Display name */
400
+ name: string;
401
+ /** Known identifiers across platforms */
402
+ channels: UserChannel[];
403
+ /** When the agent first interacted with this person */
404
+ firstInteraction: string;
405
+ /** When the agent last interacted with this person */
406
+ lastInteraction: string;
407
+ /** Total number of interactions */
408
+ interactionCount: number;
409
+ /** Key topics discussed across conversations */
410
+ themes: string[];
411
+ /** Agent's notes about this person — observations, preferences, context */
412
+ notes: string;
413
+ /** Communication style preferences the agent has observed */
414
+ communicationStyle?: string;
415
+ /** How significant this relationship is (0-10, auto-derived from frequency and depth) */
416
+ significance: number;
417
+ /** Brief summary of the relationship arc */
418
+ arcSummary?: string;
419
+ /** Relationship category (e.g., 'collaborator', 'community_member', 'kindred_ai') */
420
+ category?: string;
421
+ /** Freeform tags for flexible categorization */
422
+ tags?: string[];
423
+ /** Per-interaction log (last N interactions, kept compact) */
424
+ recentInteractions: InteractionSummary[];
425
+ }
426
+ export interface InteractionSummary {
427
+ /** When this interaction happened */
428
+ timestamp: string;
429
+ /** Which platform/channel */
430
+ channel: string;
431
+ /** Brief summary of what was discussed */
432
+ summary: string;
433
+ /** Topics touched on */
434
+ topics?: string[];
435
+ }
436
+ export interface RelationshipManagerConfig {
437
+ /** Directory to store relationship files */
438
+ relationshipsDir: string;
439
+ /** Maximum recent interactions to keep per relationship */
440
+ maxRecentInteractions: number;
441
+ /**
442
+ * Optional LLM intelligence for judgment calls (identity resolution,
443
+ * duplicate detection, merge decisions). When absent, falls back to
444
+ * string-based heuristics. When present, heuristics narrow candidates
445
+ * and the LLM makes the final call.
446
+ */
447
+ intelligence?: IntelligenceProvider;
448
+ }
449
+ export type SkipReason = 'disabled' | 'paused' | 'quota' | 'capacity' | 'claimed' | 'machine-scope';
450
+ export interface SkipEvent {
451
+ slug: string;
452
+ timestamp: string;
453
+ reason: SkipReason;
454
+ scheduledAt?: string;
455
+ }
456
+ export interface WorkloadSignal {
457
+ slug: string;
458
+ timestamp: string;
459
+ duration: number;
460
+ skipFast: boolean;
461
+ itemsFound: number;
462
+ itemsProcessed: number;
463
+ saturation: number;
464
+ notes?: string;
465
+ }
466
+ export interface AutoTuneState {
467
+ slug: string;
468
+ baseSchedule: string;
469
+ effectiveSchedule: string;
470
+ tuneFactor: number;
471
+ lastTuned: string;
472
+ recentSkipFastRate: number;
473
+ recentSaturation: number;
474
+ windowSize: number;
475
+ }
476
+ export interface ActivityEvent {
477
+ type: string;
478
+ summary: string;
479
+ /** Which session generated this event */
480
+ sessionId?: string;
481
+ /** Which user triggered this, if any */
482
+ userId?: string;
483
+ /** Originating machine ID (Phase 4D — Gap 6: machine-prefixed state) */
484
+ machineId?: string;
485
+ timestamp: string;
486
+ metadata?: Record<string, unknown>;
487
+ }
488
+ export interface FeedbackItem {
489
+ /** Unique feedback ID */
490
+ id: string;
491
+ /** Feedback type */
492
+ type: 'bug' | 'feature' | 'improvement' | 'question' | 'other';
493
+ /** Short title/summary */
494
+ title: string;
495
+ /** Detailed description */
496
+ description: string;
497
+ /** Agent name that submitted this */
498
+ agentName: string;
499
+ /** Pseudonymized agent identifier — stable hash, not reversible without shared secret */
500
+ agentPseudonym?: string;
501
+ /** Instar version the agent is running */
502
+ instarVersion: string;
503
+ /** Node.js version */
504
+ nodeVersion: string;
505
+ /** Operating system */
506
+ os: string;
507
+ /** When this feedback was submitted */
508
+ submittedAt: string;
509
+ /** Whether this has been forwarded to the webhook */
510
+ forwarded: boolean;
511
+ /** Additional context (error messages, config snippets, etc.) */
512
+ context?: string;
513
+ }
514
+ export interface FeedbackConfig {
515
+ /** Whether feedback is enabled */
516
+ enabled: boolean;
517
+ /** Webhook URL to forward feedback to (default: https://dawn.bot-me.ai/api/instar/feedback) */
518
+ webhookUrl: string;
519
+ /** Local feedback storage file */
520
+ feedbackFile: string;
521
+ /** Instar version — sent in User-Agent and X-Instar-Version headers for endpoint auth */
522
+ version?: string;
523
+ /** Shared secret for HMAC-SHA256 request signing. Generated during init. */
524
+ sharedSecret?: string;
525
+ }
526
+ export interface UpdateInfo {
527
+ /** Currently installed version */
528
+ currentVersion: string;
529
+ /** Latest available version on npm */
530
+ latestVersion: string;
531
+ /** Whether an update is available */
532
+ updateAvailable: boolean;
533
+ /** When this check was performed */
534
+ checkedAt: string;
535
+ /** Changelog URL if available */
536
+ changelogUrl?: string;
537
+ /** Human-readable summary of what changed (fetched from GitHub releases) */
538
+ changeSummary?: string;
539
+ }
540
+ export interface UpdateResult {
541
+ /** Whether the update was successfully applied */
542
+ success: boolean;
543
+ /** Version before the update */
544
+ previousVersion: string;
545
+ /** Version after the update */
546
+ newVersion: string;
547
+ /** Human-readable description of what happened */
548
+ message: string;
549
+ /** Whether a restart is needed to use the new version */
550
+ restartNeeded: boolean;
551
+ /** Health check result after update */
552
+ healthCheck?: 'healthy' | 'degraded' | 'unhealthy' | 'skipped';
553
+ }
554
+ /**
555
+ * Evolution proposal — a staged self-improvement suggestion.
556
+ *
557
+ * Unlike direct self-modification (editing jobs.json, creating skills),
558
+ * proposals are staged for review before implementation. This gives
559
+ * the agent (and optionally the user) a chance to evaluate whether
560
+ * the change is wise before it takes effect.
561
+ *
562
+ * Born from Portal's EVOLUTION_QUEUE pattern (100+ completed proposals).
563
+ */
564
+ export interface EvolutionProposal {
565
+ /** Unique ID (e.g., "EVO-001") */
566
+ id: string;
567
+ /** Short title describing the proposed change */
568
+ title: string;
569
+ /** Where this proposal came from */
570
+ source: string;
571
+ /** Full description of what to change and why */
572
+ description: string;
573
+ /** Category of change */
574
+ type: EvolutionType;
575
+ /** Expected impact if implemented */
576
+ impact: 'high' | 'medium' | 'low';
577
+ /** Estimated effort to implement */
578
+ effort: 'high' | 'medium' | 'low';
579
+ /** Current status */
580
+ status: EvolutionStatus;
581
+ /** Who or what proposed this */
582
+ proposedBy: string;
583
+ /** When proposed */
584
+ proposedAt: string;
585
+ /** When implemented (if status is 'implemented') */
586
+ implementedAt?: string;
587
+ /** Implementation notes */
588
+ resolution?: string;
589
+ /** Tags for categorization */
590
+ tags?: string[];
591
+ }
592
+ export type EvolutionType = 'capability' | 'infrastructure' | 'voice' | 'workflow' | 'philosophy' | 'integration' | 'performance';
593
+ export type EvolutionStatus = 'proposed' | 'approved' | 'in_progress' | 'implemented' | 'rejected' | 'deferred';
594
+ /**
595
+ * Structured learning entry — an insight captured from interaction.
596
+ *
597
+ * Unlike freeform MEMORY.md entries, these are structured, searchable,
598
+ * cross-referenceable, and trackable (applied vs unapplied).
599
+ */
600
+ export interface LearningEntry {
601
+ /** Unique ID (e.g., "LRN-001") */
602
+ id: string;
603
+ /** Short title */
604
+ title: string;
605
+ /** Category of learning */
606
+ category: string;
607
+ /** Full description of the insight */
608
+ description: string;
609
+ /** Where this learning came from */
610
+ source: LearningSource;
611
+ /** Tags for cross-referencing */
612
+ tags: string[];
613
+ /** Has this learning been applied to improve the agent? */
614
+ applied: boolean;
615
+ /** What it was applied to (e.g., "EVO-003", "MEMORY.md") */
616
+ appliedTo?: string;
617
+ /** How relevant this is to agent evolution (freeform) */
618
+ evolutionRelevance?: string;
619
+ }
620
+ export interface LearningSource {
621
+ /** Who/what taught this */
622
+ agent?: string;
623
+ /** Platform where discovered */
624
+ platform?: string;
625
+ /** Content reference (post ID, thread ID, etc.) */
626
+ contentId?: string;
627
+ /** When discovered */
628
+ discoveredAt: string;
629
+ /** Session that captured this */
630
+ session?: string;
631
+ }
632
+ /**
633
+ * Capability gap — something the agent can't do but should.
634
+ *
635
+ * Extends self-diagnosis from "is my infrastructure broken?" to
636
+ * "is my infrastructure sufficient?"
637
+ */
638
+ export interface CapabilityGap {
639
+ /** Unique ID (e.g., "GAP-001") */
640
+ id: string;
641
+ /** Short title */
642
+ title: string;
643
+ /** Category of gap */
644
+ category: GapCategory;
645
+ /** How critical this gap is */
646
+ severity: 'critical' | 'high' | 'medium' | 'low';
647
+ /** Full description of the gap */
648
+ description: string;
649
+ /** How the gap was discovered */
650
+ discoveredFrom: {
651
+ context: string;
652
+ platform?: string;
653
+ discoveredAt: string;
654
+ session?: string;
655
+ };
656
+ /** What the agent currently does (or doesn't) */
657
+ currentState: string;
658
+ /** What should be built to close the gap */
659
+ proposedSolution?: string;
660
+ /** Current status */
661
+ status: 'identified' | 'addressed' | 'wont_fix';
662
+ /** How it was resolved */
663
+ resolution?: string;
664
+ /** When addressed */
665
+ addressedAt?: string;
666
+ }
667
+ export type GapCategory = 'skill' | 'knowledge' | 'integration' | 'workflow' | 'communication' | 'monitoring' | 'custom';
668
+ /**
669
+ * Action/commitment item — something the agent promised to do.
670
+ *
671
+ * Tracks commitments made during interactions so they don't get lost.
672
+ * Stale commitments are escalated automatically.
673
+ */
674
+ export interface ActionItem {
675
+ /** Unique ID (e.g., "ACT-001") */
676
+ id: string;
677
+ /** What was committed */
678
+ title: string;
679
+ /** Full description */
680
+ description: string;
681
+ /** Priority level */
682
+ priority: 'critical' | 'high' | 'medium' | 'low';
683
+ /** Current status */
684
+ status: 'pending' | 'in_progress' | 'completed' | 'cancelled';
685
+ /** Who this commitment was made to */
686
+ commitTo?: string;
687
+ /** When this was created */
688
+ createdAt: string;
689
+ /** When this should be done by (ISO date) */
690
+ dueBy?: string;
691
+ /** When completed */
692
+ completedAt?: string;
693
+ /** How it was resolved */
694
+ resolution?: string;
695
+ /** Where this commitment was made */
696
+ source?: {
697
+ platform?: string;
698
+ contentId?: string;
699
+ context?: string;
700
+ };
701
+ /** Tags for categorization */
702
+ tags?: string[];
703
+ }
704
+ /**
705
+ * Evolution manager configuration.
706
+ */
707
+ export interface EvolutionManagerConfig {
708
+ /** Directory for evolution state files */
709
+ stateDir: string;
710
+ /** Whether auto-implementation of approved proposals is enabled */
711
+ autoImplement?: boolean;
712
+ /** Maximum proposals before oldest get archived */
713
+ maxProposals?: number;
714
+ /** Maximum learning entries before oldest get archived */
715
+ maxLearnings?: number;
716
+ /** Maximum gaps before oldest addressed get archived */
717
+ maxGaps?: number;
718
+ /** Maximum action items before oldest completed get archived */
719
+ maxActions?: number;
720
+ }
721
+ /** Sections of soul.md that can be individually updated. */
722
+ export type SoulSection = 'core-values' | 'growth-edge' | 'convictions' | 'open-questions' | 'integrations' | 'evolution-history';
723
+ /** Conviction confidence categories (not floats — discrete, auditable). */
724
+ export type ConvictionConfidence = 'strong' | 'growing' | 'uncertain' | 'questioning';
725
+ /** Source of a soul.md write — used for audit trail and trust decisions. */
726
+ export type SoulWriteSource = 'reflect-skill' | 'evolution-job' | 'inline' | 'threadline';
727
+ /** Operation type for PATCH /identity/soul. */
728
+ export type SoulWriteOperation = 'replace' | 'append' | 'remove';
729
+ /** Request body for PATCH /identity/soul. */
730
+ export interface SoulPatchRequest {
731
+ section: SoulSection;
732
+ operation: SoulWriteOperation;
733
+ content: string;
734
+ source: SoulWriteSource;
735
+ }
736
+ /** Response for a successful soul.md patch. */
737
+ export interface SoulPatchResponse {
738
+ status: 'applied' | 'pending';
739
+ section: SoulSection;
740
+ trustLevel: AutonomyProfileLevel;
741
+ pendingId?: string;
742
+ }
743
+ /** A pending soul.md change awaiting user approval. */
744
+ export interface SoulPendingChange {
745
+ id: string;
746
+ section: SoulSection;
747
+ operation: SoulWriteOperation;
748
+ content: string;
749
+ source: SoulWriteSource;
750
+ trustLevel: AutonomyProfileLevel;
751
+ createdAt: string;
752
+ status: 'pending' | 'approved' | 'rejected';
753
+ resolvedAt?: string;
754
+ rejectionReason?: string;
755
+ }
756
+ /** Audit event emitted on every soul.md write. */
757
+ export interface SoulWriteEvent {
758
+ event: 'soul.write';
759
+ timestamp: string;
760
+ section: SoulSection;
761
+ operation: SoulWriteOperation;
762
+ trustLevel: AutonomyProfileLevel;
763
+ source: SoulWriteSource;
764
+ diffSummary: string;
765
+ threadlineSource: string | null;
766
+ }
767
+ /** Drift analysis for a single section. */
768
+ export interface SoulDriftSection {
769
+ section: SoulSection;
770
+ divergencePercent: number;
771
+ aboveThreshold: boolean;
772
+ }
773
+ /** Full drift analysis result. */
774
+ export interface SoulDriftReport {
775
+ sections: SoulDriftSection[];
776
+ anyAboveThreshold: boolean;
777
+ lastReviewedAt: string | null;
778
+ initSnapshotExists: boolean;
779
+ }
780
+ /**
781
+ * Minimum trust level required to DIRECTLY write to each soul.md section.
782
+ * At lower levels, writes are routed to the pending queue (not rejected).
783
+ * Collaborative+ can write to all sections directly.
784
+ */
785
+ export declare const SOUL_SECTION_TRUST: Record<SoulSection, AutonomyProfileLevel>;
786
+ /**
787
+ * Configuration for Living Skills on a job.
788
+ * Opt-in only — no journaling occurs unless explicitly enabled.
789
+ */
790
+ export interface LivingSkillsConfig {
791
+ /** Whether execution journaling is enabled for this job */
792
+ enabled: boolean;
793
+ /** Named steps the job definition says should be executed */
794
+ definedSteps?: Array<string | DefinedStepConfig>;
795
+ /** Run per-job LLM reflection after each run. Default: true (set false to disable) */
796
+ perJobReflection?: boolean;
797
+ /** Model for per-job reflection. Default: opus */
798
+ reflectionModel?: ModelTier | null;
799
+ /** Frequency threshold for pattern proposals (0.0-1.0). Default: 0.6 */
800
+ patternThreshold?: number;
801
+ /** Enable IntegrationGate (blocks queue drain until learning captured). Default: true when livingSkills enabled */
802
+ integrationGate?: boolean;
803
+ /** Timeout in ms for IntegrationGate evaluation. Default: 30000 */
804
+ integrationGateTimeoutMs?: number;
805
+ }
806
+ export interface DefinedStepConfig {
807
+ step: string;
808
+ /** If true, this step is protected from omission-detection removal proposals */
809
+ required?: boolean;
810
+ }
811
+ /** A single captured execution step within a job run */
812
+ export interface ExecutionStep {
813
+ /** Human-readable step identifier (e.g., "check-redis", "deploy-staging") */
814
+ step: string;
815
+ /** ISO timestamp when this step was captured */
816
+ timestamp: string;
817
+ /** Whether captured by hook (authoritative) or reported by agent (advisory) */
818
+ source: ExecutionStepSource;
819
+ /** Optional notes about what happened */
820
+ notes?: string;
821
+ /** The raw command that triggered capture (sanitized) */
822
+ command?: string;
823
+ /** Whether this step was in the job's definedSteps */
824
+ inDefinition?: boolean;
825
+ }
826
+ export type ExecutionStepSource = 'hook' | 'agent' | 'reconciled';
827
+ /** A deviation from the expected job definition */
828
+ export interface ExecutionDeviation {
829
+ type: 'addition' | 'omission' | 'modification';
830
+ step: string;
831
+ reason?: string;
832
+ }
833
+ /**
834
+ * A single execution record in the journal.
835
+ * One entry per job run, written to JSONL on session finalization.
836
+ */
837
+ export interface ExecutionRecord {
838
+ /** Unique execution ID (e.g., "exec-20260304-abc123") */
839
+ executionId: string;
840
+ /** Job slug this belongs to */
841
+ jobSlug: string;
842
+ /** Session ID that ran this job */
843
+ sessionId: string;
844
+ /** Agent identity for multi-agent namespacing */
845
+ agentId: string;
846
+ /** ISO timestamp of job start */
847
+ timestamp: string;
848
+ /** Steps the job definition says should run */
849
+ definedSteps: string[];
850
+ /** Steps actually captured during the run */
851
+ actualSteps: ExecutionStep[];
852
+ /** Deviations from defined steps */
853
+ deviations: ExecutionDeviation[];
854
+ /** How the job ended */
855
+ outcome: 'success' | 'failure' | 'timeout' | 'unknown';
856
+ /** Actual duration in minutes */
857
+ durationMinutes?: number;
858
+ /** Whether this record has been finalized */
859
+ finalized: boolean;
860
+ }
861
+ /**
862
+ * A pending step captured during execution.
863
+ * Accumulated by the hook in _pending.{sessionId}.jsonl,
864
+ * then merged into a full ExecutionRecord on finalization.
865
+ */
866
+ export interface PendingStep {
867
+ sessionId: string;
868
+ jobSlug: string;
869
+ timestamp: string;
870
+ command: string;
871
+ source: 'hook';
872
+ stepLabel?: string;
873
+ }
874
+ /**
875
+ * Decision journal entry — records intent-relevant decisions for alignment analysis.
876
+ *
877
+ * The decision journal is the measurement foundation for intent engineering.
878
+ * Without observing real agent decisions, intent definitions are speculation.
879
+ * Zero-config: logging activates automatically when an Intent section exists in AGENT.md.
880
+ *
881
+ * Storage: per-agent JSONL file (.instar/decision-journal.jsonl)
882
+ */
883
+ export interface DecisionJournalEntry {
884
+ /** ISO 8601 timestamp */
885
+ timestamp: string;
886
+ /** Session ID that made the decision */
887
+ sessionId: string;
888
+ /** Telegram topic ID if applicable */
889
+ topicId?: number;
890
+ /** Job slug if this decision was made during a job */
891
+ jobSlug?: string;
892
+ /** What was decided */
893
+ decision: string;
894
+ /** What alternatives were considered */
895
+ alternatives?: string[];
896
+ /** Which AGENT.md principle or intent guided the choice */
897
+ principle?: string;
898
+ /** Agent's confidence in alignment with stated intent (0-1) */
899
+ confidence?: number;
900
+ /** Relevant context at decision time */
901
+ context?: string;
902
+ /** Whether this decision conflicted with an org-level constraint */
903
+ conflict?: boolean;
904
+ /** Tags for categorization */
905
+ tags?: string[];
906
+ }
907
+ /**
908
+ * Dispatch-specific decision journal entry.
909
+ * Extends the base DecisionJournalEntry with dispatch integration fields.
910
+ * This is the foundation for the Discernment Layer — logging every dispatch
911
+ * integration decision for observability, harvesting, and identity formation.
912
+ *
913
+ * In Milestone 1, all entries are `{ dispatchDecision: 'accept', reasoning: 'auto-applied' }`.
914
+ * Intelligence comes in Milestone 4 (LLM evaluation).
915
+ */
916
+ export interface DispatchDecisionEntry extends DecisionJournalEntry {
917
+ /** Discriminator tag for dispatch decisions */
918
+ type: 'dispatch';
919
+ /** The dispatch ID this decision applies to */
920
+ dispatchId: string;
921
+ /** Dispatch type (lesson, strategy, configuration, etc.) */
922
+ dispatchType: string;
923
+ /** Dispatch priority */
924
+ dispatchPriority: string;
925
+ /** The integration decision */
926
+ dispatchDecision: 'accept' | 'adapt' | 'defer' | 'reject';
927
+ /** Why this decision was made */
928
+ reasoning: string;
929
+ /** Whether this was auto-evaluated (structural only) or LLM-evaluated */
930
+ evaluationMethod: 'structural' | 'contextual';
931
+ /** Adaptation summary if decision was 'adapt' */
932
+ adaptationSummary?: string;
933
+ /** Post-adaptation scope validation result */
934
+ adaptationScopeResult?: 'passed' | 'failed' | 'skipped';
935
+ /** Evaluator prompt version (for tracking drift) */
936
+ promptVersion?: string;
937
+ /** Whether the dispatch was successfully applied after acceptance */
938
+ applied?: boolean;
939
+ /** Error message if application failed */
940
+ applicationError?: string;
941
+ }
942
+ /**
943
+ * Structured snapshot of agent state for contextual dispatch evaluation.
944
+ * Used by the Discernment Layer to provide the LLM evaluator with
945
+ * agent context. Designed with data minimization — only structural
946
+ * metadata, no sensitive operational details.
947
+ *
948
+ * Hard truncation rules (from spec v3):
949
+ * - identity.intent: max 200 tokens (~800 chars), truncated with [truncated]
950
+ * - recentDecisions: max 20 entries, each decision string max 100 chars
951
+ * - activeJobs: max 20 entries
952
+ * - appliedDispatchSummary: counts only, no content
953
+ * - Total snapshot MUST fit in 800 tokens
954
+ */
955
+ export interface AgentContextSnapshot {
956
+ /** Agent name and description */
957
+ identity: {
958
+ name: string;
959
+ description: string;
960
+ intent?: string;
961
+ };
962
+ /** Enabled features and platform bindings */
963
+ capabilities: {
964
+ platforms: string[];
965
+ features: string[];
966
+ disabledFeatures: string[];
967
+ };
968
+ /** Active job slugs and descriptions */
969
+ activeJobs: Array<{
970
+ slug: string;
971
+ description: string;
972
+ }>;
973
+ /** Recent decision patterns (last 20 entries, summarized) */
974
+ recentDecisions: Array<{
975
+ decision: string;
976
+ principle?: string;
977
+ tags?: string[];
978
+ }>;
979
+ /** Current autonomy profile level */
980
+ autonomyLevel: AutonomyProfileLevel;
981
+ /** Count and types of already-applied dispatches */
982
+ appliedDispatchSummary: {
983
+ count: number;
984
+ byType: Record<string, number>;
985
+ };
986
+ /** Self-knowledge tree metadata (if tree is configured) */
987
+ selfKnowledge?: {
988
+ treeVersion: string;
989
+ totalNodes: number;
990
+ lastSearchQuery?: string;
991
+ lastSearchTimestamp?: string;
992
+ };
993
+ /** Snapshot generation timestamp */
994
+ generatedAt: string;
995
+ }
996
+ export interface MachineIdentity {
997
+ /** Unique machine ID: "m_" + 32 random hex chars (128 bits) */
998
+ machineId: string;
999
+ /** Base64-encoded Ed25519 public key (for signing commits, API requests) */
1000
+ signingPublicKey: string;
1001
+ /** Base64-encoded X25519 public key (for encryption, ECDH key agreement) */
1002
+ encryptionPublicKey: string;
1003
+ /** Human-friendly machine name (auto-detected or user-provided) */
1004
+ name: string;
1005
+ /** Platform identifier, e.g. "darwin-arm64", "linux-x64" */
1006
+ platform: string;
1007
+ /** ISO timestamp of identity creation */
1008
+ createdAt: string;
1009
+ /** What this machine can do */
1010
+ capabilities: MachineCapability[];
1011
+ }
1012
+ export type MachineCapability = 'telegram' | 'jobs' | 'tunnel' | 'sessions';
1013
+ export type MachineStatus = 'active' | 'revoked' | 'pending';
1014
+ export type MachineRole = 'awake' | 'standby';
1015
+ /**
1016
+ * Coordination mode for multi-machine setups.
1017
+ * - 'primary-standby': One awake, others standby with failover (default)
1018
+ * - 'independent': Both machines active with separate Telegram groups (Gap 1)
1019
+ */
1020
+ export type CoordinationMode = 'primary-standby' | 'independent';
1021
+ export interface MachineRegistryEntry {
1022
+ /** Human-friendly machine name */
1023
+ name: string;
1024
+ /** Current trust status */
1025
+ status: MachineStatus;
1026
+ /** Current operational role */
1027
+ role: MachineRole;
1028
+ /** ISO timestamp of when this machine was paired */
1029
+ pairedAt: string;
1030
+ /** ISO timestamp of last heartbeat or activity */
1031
+ lastSeen: string;
1032
+ /** Last known reachable URL (tunnel URL) — for cross-machine relay */
1033
+ lastKnownUrl?: string;
1034
+ /** ISO timestamp of revocation (if revoked) */
1035
+ revokedAt?: string;
1036
+ /** Machine ID that revoked this one */
1037
+ revokedBy?: string;
1038
+ /** Human-readable revocation reason */
1039
+ revokeReason?: string;
1040
+ }
1041
+ export interface MachineRegistry {
1042
+ /** Schema version for future migrations */
1043
+ version: number;
1044
+ /** Map of machineId -> registry entry */
1045
+ machines: Record<string, MachineRegistryEntry>;
1046
+ }
1047
+ export interface MultiMachineConfig {
1048
+ /** Whether multi-machine is enabled */
1049
+ enabled: boolean;
1050
+ /** Whether to auto-promote standby when awake goes silent */
1051
+ autoFailover: boolean;
1052
+ /** Minutes of silence before auto-failover (default: 15) */
1053
+ failoverTimeoutMinutes: number;
1054
+ /** Whether to require human confirmation before auto-failover */
1055
+ autoFailoverConfirm: boolean;
1056
+ /**
1057
+ * Coordination mode (Gap 1 — Active/Active support).
1058
+ * - 'primary-standby': One awake, others standby with failover (default)
1059
+ * - 'independent': Both machines active with separate Telegram groups
1060
+ */
1061
+ coordinationMode?: CoordinationMode;
1062
+ }
1063
+ export type AgentAutonomyLevel = 'supervised' | 'collaborative' | 'autonomous';
1064
+ export type UserRegistrationPolicy = 'open' | 'invite-only' | 'admin-only';
1065
+ export interface AgentAutonomyCapabilities {
1066
+ /** Agent adds context to admin join-request notifications */
1067
+ assessJoinRequests: boolean;
1068
+ /** Agent suggests resolution before escalating conflicts */
1069
+ proposeConflictResolution: boolean;
1070
+ /** Agent surfaces usage-based config recommendations */
1071
+ recommendConfigChanges: boolean;
1072
+ /** Agent enables jobs it previously ran on another machine */
1073
+ autoEnableVerifiedJobs: boolean;
1074
+ /** Agent notices and reports degraded states proactively */
1075
+ proactiveStatusAlerts: boolean;
1076
+ /** Agent approves joins for pre-announced users (autonomous only) */
1077
+ autoApproveKnownContacts: boolean;
1078
+ }
1079
+ export interface AgentAutonomyConfig {
1080
+ /** How much the agent handles on its own */
1081
+ level: AgentAutonomyLevel;
1082
+ /** Fine-grained capability toggles */
1083
+ capabilities: AgentAutonomyCapabilities;
1084
+ }
1085
+ export interface RecoveryKeyConfig {
1086
+ /** bcrypt hash of the recovery key */
1087
+ keyHash: string;
1088
+ /** ISO timestamp of creation */
1089
+ createdAt: string;
1090
+ /** ISO timestamp of last use, or null */
1091
+ lastUsedAt: string | null;
1092
+ /** Number of times the recovery key has been used */
1093
+ usageCount: number;
1094
+ }
1095
+ export interface ConsentRecord {
1096
+ /** Whether consent was given */
1097
+ consentGiven: boolean;
1098
+ /** ISO timestamp of consent */
1099
+ consentDate: string;
1100
+ /** Version of the privacy notice consented to */
1101
+ consentNoticeVersion?: string;
1102
+ }
1103
+ export interface DataCollectedManifest {
1104
+ name: boolean;
1105
+ telegramId: boolean;
1106
+ communicationPreferences: boolean;
1107
+ conversationHistory: boolean;
1108
+ memoryEntries: boolean;
1109
+ machineIdentities: boolean;
1110
+ }
1111
+ /**
1112
+ * Agent-configurable onboarding settings.
1113
+ * Controls what data is collected during user registration beyond the minimum
1114
+ * (name + consent). All fields are optional — agents can progressively enhance
1115
+ * onboarding depth.
1116
+ */
1117
+ export interface OnboardingConfig {
1118
+ /** Whether to collect a short bio during onboarding (default: false) */
1119
+ collectBio?: boolean;
1120
+ /** Whether to collect interests/topics (default: false) */
1121
+ collectInterests?: boolean;
1122
+ /** Whether to collect timezone (default: false) */
1123
+ collectTimezone?: boolean;
1124
+ /** Whether to collect communication style preference (default: false) */
1125
+ collectStyle?: boolean;
1126
+ /** Whether to collect relationship context — how the user relates to the agent/project (default: false) */
1127
+ collectRelationshipContext?: boolean;
1128
+ /** Custom onboarding questions defined by the agent operator */
1129
+ customQuestions?: OnboardingQuestion[];
1130
+ /** Custom consent disclosure text (overrides default) */
1131
+ consentDisclosure?: string;
1132
+ /** Max tokens for per-user context injection into sessions (default: 500) */
1133
+ maxContextTokens?: number;
1134
+ }
1135
+ /**
1136
+ * A custom onboarding question defined by the agent operator.
1137
+ * Answers are stored in UserProfile.customFields keyed by `fieldName`.
1138
+ */
1139
+ export interface OnboardingQuestion {
1140
+ /** Storage key in UserProfile.customFields */
1141
+ fieldName: string;
1142
+ /** Human-readable prompt shown to the user */
1143
+ prompt: string;
1144
+ /** Whether this question is required (default: false) */
1145
+ required?: boolean;
1146
+ /** Placeholder text / example answer */
1147
+ placeholder?: string;
1148
+ }
1149
+ export interface VerificationCode {
1150
+ /** The hashed code */
1151
+ codeHash: string;
1152
+ /** ISO timestamp of creation */
1153
+ createdAt: string;
1154
+ /** Minutes until expiry */
1155
+ expiryMinutes: number;
1156
+ /** Max attempts before lockout */
1157
+ maxAttempts: number;
1158
+ /** Current attempt count */
1159
+ attempts: number;
1160
+ /** Whether this code has been used */
1161
+ used: boolean;
1162
+ /** Target user ID (for Telegram push) or machine ID (for pairing) */
1163
+ targetId: string;
1164
+ /** Code type */
1165
+ type: 'telegram-push' | 'pairing-code' | 'recovery-key';
1166
+ }
1167
+ export interface JoinRequest {
1168
+ /** Unique request ID */
1169
+ requestId: string;
1170
+ /** Display name from the requester */
1171
+ name: string;
1172
+ /** Telegram user ID of the requester */
1173
+ telegramUserId: number;
1174
+ /** Agent's contextual assessment (from conversation history) */
1175
+ agentAssessment: string | null;
1176
+ /** Approval code for this request */
1177
+ approvalCode: string;
1178
+ /** ISO timestamp */
1179
+ requestedAt: string;
1180
+ /** Status */
1181
+ status: 'pending' | 'approved' | 'denied' | 'expired';
1182
+ /** Who approved/denied (user ID) */
1183
+ resolvedBy?: string;
1184
+ /** ISO timestamp of resolution */
1185
+ resolvedAt?: string;
1186
+ }
1187
+ export interface ExternalOperationsConfig {
1188
+ /** Whether external operation safety is enabled (default: true) */
1189
+ enabled: boolean;
1190
+ /** Message Sentinel configuration */
1191
+ sentinel?: {
1192
+ /** Whether the sentinel is enabled (default: true) */
1193
+ enabled: boolean;
1194
+ };
1195
+ /** Per-service permissions (structural floor) */
1196
+ services?: Record<string, ExternalServicePermissions>;
1197
+ /** Services that are completely read-only (no mutations allowed) */
1198
+ readOnlyServices?: string[];
1199
+ /** Trust configuration */
1200
+ trust?: {
1201
+ /** Trust floor — never auto-escalate past this (default: 'collaborative') */
1202
+ floor: 'supervised' | 'collaborative';
1203
+ /** Whether auto-elevation is enabled (default: true) */
1204
+ autoElevateEnabled: boolean;
1205
+ /** Successes before suggesting elevation (default: 5) */
1206
+ elevationThreshold: number;
1207
+ };
1208
+ }
1209
+ export interface ExternalServicePermissions {
1210
+ /** Allowed operation types */
1211
+ permissions: string[];
1212
+ /** Blocked operation types (hard gate — no override) */
1213
+ blocked?: string[];
1214
+ /** Operations that require approval regardless of trust level */
1215
+ requireApproval?: string[];
1216
+ /** Maximum items per batch operation */
1217
+ batchLimit?: number;
1218
+ }
1219
+ export interface InstarConfig {
1220
+ /** Project name (used in logging, tmux session names, etc.) */
1221
+ projectName: string;
1222
+ /** Project root directory */
1223
+ projectDir: string;
1224
+ /** Where instar stores its runtime state */
1225
+ stateDir: string;
1226
+ /** HTTP server port */
1227
+ port: number;
1228
+ /** HTTP server bind address (default: '127.0.0.1' for security) */
1229
+ host?: string;
1230
+ /** Session manager config */
1231
+ sessions: SessionManagerConfig;
1232
+ /** Job scheduler config */
1233
+ scheduler: JobSchedulerConfig;
1234
+ /** Registered users */
1235
+ users: UserProfile[];
1236
+ /** Messaging adapters to enable */
1237
+ messaging: MessagingAdapterConfig[];
1238
+ /** Monitoring config */
1239
+ monitoring: MonitoringConfig;
1240
+ /** Auth token for API access (generated during setup) */
1241
+ authToken?: string;
1242
+ /** PIN for dashboard web access (simpler than authToken, used for mobile/remote login) */
1243
+ dashboardPin?: string;
1244
+ /** Relationship tracking config */
1245
+ relationships?: RelationshipManagerConfig;
1246
+ /** Feedback loop config */
1247
+ feedback?: FeedbackConfig;
1248
+ /** Dispatch (intelligence broadcast) config */
1249
+ dispatches?: DispatchConfig;
1250
+ /** Git backup config (opt-in for standalone agents) */
1251
+ gitBackup?: {
1252
+ /** Whether git backup is enabled. Defaults to true if .git/ exists, false otherwise. */
1253
+ enabled: boolean;
1254
+ /** Git remote name (default: "origin") */
1255
+ remote?: string;
1256
+ /** Auto-push after commits (default: true) */
1257
+ autoPush?: boolean;
1258
+ /** How often to run the git-sync job in minutes (default: 60). Set to 0 to disable. */
1259
+ syncIntervalMinutes?: number;
1260
+ };
1261
+ /** Update configuration */
1262
+ updates?: UpdateConfig;
1263
+ /** Publishing (Telegraph) config */
1264
+ publishing?: PublishingConfig;
1265
+ /** Cloudflare Tunnel config */
1266
+ tunnel?: TunnelConfigType;
1267
+ /** Request timeout in milliseconds (default: 30000) */
1268
+ requestTimeoutMs?: number;
1269
+ /** Instar version (from package.json) */
1270
+ version?: string;
1271
+ /** Safety configuration for autonomous operation */
1272
+ safety?: SafetyConfig;
1273
+ /** Evolution system configuration */
1274
+ evolution?: EvolutionManagerConfig;
1275
+ /** Multi-machine coordination config */
1276
+ multiMachine?: MultiMachineConfig;
1277
+ /** Agent type -- standalone lives at ~/.instar/agents/<name>/, project-bound lives in a project */
1278
+ agentType?: AgentType;
1279
+ /** User registration policy */
1280
+ userRegistrationPolicy?: UserRegistrationPolicy;
1281
+ /** Agent autonomy configuration */
1282
+ agentAutonomy?: AgentAutonomyConfig;
1283
+ /** External operation safety — gate, sentinel, trust */
1284
+ externalOperations?: ExternalOperationsConfig;
1285
+ /** Recovery key for admin self-recovery */
1286
+ recoveryKey?: RecoveryKeyConfig;
1287
+ /** Registration contact hint for rejected users */
1288
+ registrationContactHint?: string;
1289
+ /** Onboarding configuration — controls what data is collected during user registration */
1290
+ onboarding?: OnboardingConfig;
1291
+ /** Adaptive Autonomy — unified autonomy profile that coordinates all subsystems */
1292
+ autonomyProfile?: AutonomyProfileLevel;
1293
+ /** Notification preferences for autonomy events */
1294
+ notifications?: NotificationPreferences;
1295
+ /** Response Review Pipeline (Coherence Gate) configuration */
1296
+ responseReview?: ResponseReviewConfig;
1297
+ /** Input Guard — cross-topic injection defense */
1298
+ inputGuard?: InputGuardConfig;
1299
+ /** Threadline relay — cloud relay connection for inter-agent communication */
1300
+ threadline?: ThreadlineConfig;
1301
+ /** Dashboard configuration */
1302
+ dashboard?: DashboardConfig;
1303
+ /** HMAC signing key for context file integrity verification (auto-generated, 32-byte hex) */
1304
+ contextSigningKey?: string;
1305
+ }
1306
+ export interface DashboardConfig {
1307
+ /** File viewer configuration */
1308
+ fileViewer?: FileViewerConfig;
1309
+ }
1310
+ export interface FileViewerConfig {
1311
+ /** Enable the file viewer tab in the dashboard. Default: true */
1312
+ enabled: boolean;
1313
+ /** Directories available for browsing (relative to project root).
1314
+ * Default: ['.claude/', 'docs/'] */
1315
+ allowedPaths: string[];
1316
+ /** Directories where editing is permitted (subset of allowedPaths).
1317
+ * Default: [] — nothing editable without explicit opt-in. */
1318
+ editablePaths: string[];
1319
+ /** Maximum file size to serve for reading (bytes). Default: 1048576 (1MB) */
1320
+ maxFileSize: number;
1321
+ /** Maximum file size for editing (bytes). Default: 204800 (200KB) */
1322
+ maxEditableFileSize: number;
1323
+ /** File patterns that are NEVER served, even within allowed directories. */
1324
+ blockedFilenames: string[];
1325
+ }
1326
+ export interface ThreadlineConfig {
1327
+ /** Whether cloud relay is enabled (default: false, opt-in) */
1328
+ relayEnabled: boolean;
1329
+ /** Cloud relay URL (default: 'wss://threadline-relay.fly.dev/v1/connect') */
1330
+ relayUrl?: string;
1331
+ /** Agent visibility on the relay network: 'public' (discoverable), 'unlisted' (direct only), 'private' (no relay) */
1332
+ visibility?: 'public' | 'unlisted' | 'private';
1333
+ /** Agent capabilities advertised on the network */
1334
+ capabilities?: string[];
1335
+ /** Whether to send auto-ack for incoming messages (default: true) */
1336
+ autoAck?: boolean;
1337
+ /** Custom auto-ack message text */
1338
+ autoAckMessage?: string;
1339
+ /** Max acks per minute per sender (default: 5) */
1340
+ ackRateLimit?: number;
1341
+ /** First-contact policy: 'supervised' (hold for approval) or 'auto' (respond immediately) */
1342
+ firstContactPolicy?: 'supervised' | 'auto';
1343
+ }
1344
+ export interface InputGuardConfig {
1345
+ /** Whether the Input Guard is enabled */
1346
+ enabled: boolean;
1347
+ /** Enable Layer 1 provenance checking (default: true) */
1348
+ provenanceCheck?: boolean;
1349
+ /** Enable Layer 1.5 injection pattern detection (default: true) */
1350
+ injectionPatterns?: boolean;
1351
+ /** Enable Layer 2 LLM topic coherence review (default: true) */
1352
+ topicCoherenceReview?: boolean;
1353
+ /** Action on suspicious messages: 'warn' (default), 'block', 'log' */
1354
+ action?: 'warn' | 'block' | 'log';
1355
+ /** Timeout for LLM review in ms (default: 3000) */
1356
+ reviewTimeout?: number;
1357
+ }
1358
+ export interface ResponseReviewConfig {
1359
+ /** Whether the review pipeline is enabled */
1360
+ enabled: boolean;
1361
+ /** Per-reviewer configuration */
1362
+ reviewers?: Record<string, ReviewerConfig>;
1363
+ /** Observe-only mode — log violations without blocking */
1364
+ observeOnly?: boolean;
1365
+ /** Default timeout for reviewers in ms */
1366
+ timeoutMs?: number;
1367
+ /** Model to use for the gate reviewer */
1368
+ gateModel?: string;
1369
+ /** Model to use for specialist reviewers */
1370
+ reviewerModel?: string;
1371
+ /** Per-reviewer model overrides */
1372
+ reviewerModelOverrides?: Record<string, string>;
1373
+ /** Max retries for failed reviews */
1374
+ maxRetries?: number;
1375
+ /** Per-reviewer criticality levels */
1376
+ reviewerCriticality?: Record<string, 'critical' | 'high' | 'medium' | 'low'>;
1377
+ /** Threshold for escalating warn-mode violations */
1378
+ warnEscalationThreshold?: number;
1379
+ /** Per-channel overrides */
1380
+ channels?: Record<string, ChannelReviewConfig>;
1381
+ /** Default channel configs by type */
1382
+ channelDefaults?: {
1383
+ internal?: ChannelReviewConfig;
1384
+ external?: ChannelReviewConfig;
1385
+ };
1386
+ /** Enable prompt caching for LLM calls */
1387
+ promptCaching?: boolean;
1388
+ /** Disable the test endpoint */
1389
+ testEndpointDisabled?: boolean;
1390
+ }
1391
+ export interface ReviewerConfig {
1392
+ enabled: boolean;
1393
+ mode: 'block' | 'warn' | 'observe';
1394
+ }
1395
+ export interface ChannelReviewConfig {
1396
+ /** Whether to fail open (allow message) on review error */
1397
+ failOpen?: boolean;
1398
+ /** Skip the gate reviewer for this channel */
1399
+ skipGate?: boolean;
1400
+ /** Queue the message for manual review on failure */
1401
+ queueOnFailure?: boolean;
1402
+ /** Timeout for queued reviews in ms */
1403
+ queueTimeoutMs?: number;
1404
+ /** Additional reviewer names to enable for this channel */
1405
+ additionalReviewers?: string[];
1406
+ }
1407
+ /**
1408
+ * Four named autonomy profiles, each coordinating all subsystems.
1409
+ * Users set this conversationally ("go autonomous", "supervise everything").
1410
+ * The agent handles the config mapping.
1411
+ */
1412
+ export type AutonomyProfileLevel = 'cautious' | 'supervised' | 'collaborative' | 'autonomous';
1413
+ /**
1414
+ * The resolved autonomy state after profile + overrides are applied.
1415
+ * This is what subsystems actually read.
1416
+ */
1417
+ export interface ResolvedAutonomyState {
1418
+ /** The base profile */
1419
+ profile: AutonomyProfileLevel;
1420
+ /** Evolution governance mode */
1421
+ evolutionApprovalMode: 'ai-assisted' | 'autonomous';
1422
+ /** Safety level */
1423
+ safetyLevel: 1 | 2;
1424
+ /** Agent autonomy level for operations */
1425
+ agentAutonomyLevel: AgentAutonomyLevel;
1426
+ /** Whether updates auto-apply */
1427
+ autoApplyUpdates: boolean;
1428
+ /** Whether server auto-restarts after updates */
1429
+ autoRestart: boolean;
1430
+ /** Trust auto-elevation enabled */
1431
+ trustAutoElevate: boolean;
1432
+ /** How aggressively to surface undiscovered features */
1433
+ discoveryAggressiveness: 'passive' | 'contextual' | 'proactive';
1434
+ }
1435
+ export interface NotificationPreferences {
1436
+ /** How evolution notifications are batched */
1437
+ evolutionDigest?: 'immediate' | 'hourly' | 'daily';
1438
+ /** Whether to surface trust elevation suggestions */
1439
+ trustElevationSuggestions?: boolean;
1440
+ /** Whether to notify about post-update migrations */
1441
+ migrationNotifications?: boolean;
1442
+ }
1443
+ /**
1444
+ * Safety configuration — controls the progression from supervised to autonomous operation.
1445
+ *
1446
+ * The PreToolUse hook system supports two safety levels:
1447
+ *
1448
+ * Level 1 (default): "Ask the user"
1449
+ * - Risky commands are blocked. Agent must ask the user for confirmation.
1450
+ * - Safe starting point. Human stays in the loop. Trust builds over time.
1451
+ *
1452
+ * Level 2: "Agent self-verifies"
1453
+ * - Risky commands inject a self-verification prompt instead of blocking.
1454
+ * - Agent reasons about whether the action is correct before proceeding.
1455
+ * - Enables fully hands-off autonomous operation with intelligent safety.
1456
+ * - Truly catastrophic commands (rm -rf /, fork bombs) are ALWAYS blocked.
1457
+ *
1458
+ * The progression from Level 1 → Level 2 is the path to full autonomy.
1459
+ */
1460
+ export interface SafetyConfig {
1461
+ /**
1462
+ * Safety level:
1463
+ * 1 = Ask user before risky actions (default, recommended to start)
1464
+ * 2 = Agent self-verifies before risky actions (autonomous mode)
1465
+ */
1466
+ level: 1 | 2;
1467
+ /**
1468
+ * Commands that are ALWAYS blocked regardless of safety level.
1469
+ * These are catastrophic, irreversible operations that no self-check can undo.
1470
+ */
1471
+ alwaysBlock?: string[];
1472
+ }
1473
+ export interface PublishingConfig {
1474
+ /** Whether publishing is enabled (default: true when Telegram is configured) */
1475
+ enabled: boolean;
1476
+ /** Short name for the Telegraph account */
1477
+ shortName?: string;
1478
+ /** Author name shown on published pages */
1479
+ authorName?: string;
1480
+ /** Author URL shown on published pages */
1481
+ authorUrl?: string;
1482
+ }
1483
+ export interface TunnelConfigType {
1484
+ /** Whether tunnel is enabled */
1485
+ enabled: boolean;
1486
+ /** Tunnel type: 'quick' (ephemeral, no account) or 'named' (persistent, requires token) */
1487
+ type: 'quick' | 'named';
1488
+ /** Cloudflare tunnel token (required for named tunnels using token auth) */
1489
+ token?: string;
1490
+ /** Config file path for named tunnels using credentials file auth */
1491
+ configFile?: string;
1492
+ /** Public hostname for named tunnels (e.g., echo.dawn-tunnel.dev) */
1493
+ hostname?: string;
1494
+ }
1495
+ export interface DispatchConfig {
1496
+ /** Whether dispatch polling is enabled */
1497
+ enabled: boolean;
1498
+ /** URL to poll for dispatches */
1499
+ dispatchUrl: string;
1500
+ /** Local dispatch storage file */
1501
+ dispatchFile: string;
1502
+ /** Instar version — sent in headers for version-specific filtering */
1503
+ version?: string;
1504
+ /** Whether to auto-apply safe dispatches (lesson, strategy types with non-critical priority) */
1505
+ autoApply?: boolean;
1506
+ }
1507
+ export interface UpdateConfig {
1508
+ /** Whether to auto-apply updates without user confirmation (default: true) */
1509
+ autoApply: boolean;
1510
+ /** Preferred restart window (24h local time). Restarts deferred until this window.
1511
+ * Example: { start: "02:00", end: "05:00" }. Manual triggers bypass the window. */
1512
+ restartWindow?: {
1513
+ start: string;
1514
+ end: string;
1515
+ } | null;
1516
+ }
1517
+ export interface MessagingAdapterConfig {
1518
+ type: string;
1519
+ enabled: boolean;
1520
+ config: Record<string, unknown>;
1521
+ }
1522
+ export interface MonitoringConfig {
1523
+ /** Enable quota tracking */
1524
+ quotaTracking: boolean;
1525
+ /** Enable memory pressure monitoring */
1526
+ memoryMonitoring: boolean;
1527
+ /** Health check interval in ms */
1528
+ healthCheckIntervalMs: number;
1529
+ /** Session watchdog — auto-remediation for stuck commands */
1530
+ watchdog?: {
1531
+ enabled: boolean;
1532
+ /** Seconds before a command is considered stuck (default: 180) */
1533
+ stuckCommandSec?: number;
1534
+ /** Poll interval in ms (default: 30000) */
1535
+ pollIntervalMs?: number;
1536
+ };
1537
+ /** LLM-powered stall triage nurse — intelligent session recovery */
1538
+ triage?: {
1539
+ enabled: boolean;
1540
+ /** Anthropic API key (falls back to env) */
1541
+ apiKey?: string;
1542
+ /** Cooldown between triages for same topic in ms (default: 180000) */
1543
+ cooldownMs?: number;
1544
+ /** Delay before verifying action worked in ms (default: 10000) */
1545
+ verifyDelayMs?: number;
1546
+ /** Max escalation attempts (default: 2) */
1547
+ maxEscalations?: number;
1548
+ /** Use IntelligenceProvider instead of direct API (default: true) */
1549
+ useIntelligenceProvider?: boolean;
1550
+ };
1551
+ /** TriageOrchestrator — next-gen session recovery with scoped Claude Code sessions */
1552
+ triageOrchestrator?: {
1553
+ enabled: boolean;
1554
+ /** Cooldown between triages for same topic in ms (default: 180000) */
1555
+ cooldownMs?: number;
1556
+ /** Max concurrent triage sessions (default: 3) */
1557
+ maxConcurrentTriages?: number;
1558
+ /** Enable auto-actions like auto_restart, auto_interrupt (default: true) */
1559
+ autoActionEnabled?: boolean;
1560
+ /** Max auto-actions per hour (default: 5) */
1561
+ maxAutoActionsPerHour?: number;
1562
+ /** Default model tier for triage sessions (default: 'sonnet') */
1563
+ defaultModel?: 'sonnet' | 'opus';
1564
+ };
1565
+ /** Proactive session health monitoring */
1566
+ sessionMonitor?: {
1567
+ /** Enable the session monitor (default: true) */
1568
+ enabled?: boolean;
1569
+ /** How often to check sessions, in seconds (default: 60) */
1570
+ pollIntervalSec?: number;
1571
+ /** Minutes of inactivity before a session is flagged as idle (default: 15) */
1572
+ idleThresholdMinutes?: number;
1573
+ /** Minimum minutes between user notifications per topic (default: 30) */
1574
+ notificationCooldownMinutes?: number;
1575
+ };
1576
+ /** Whether to report external (non-instar) Claude processes to the user (default: true) */
1577
+ reportExternalProcesses?: boolean;
1578
+ /** System Reviewer — periodic self-monitoring of feature health */
1579
+ systemReview?: {
1580
+ /** Enable the system reviewer (default: true) */
1581
+ enabled?: boolean;
1582
+ /** How often to run scheduled reviews in ms (default: 6 hours) */
1583
+ scheduleMs?: number;
1584
+ /** Which tiers to include in scheduled runs (default: [1, 2, 3]) */
1585
+ scheduledTiers?: number[];
1586
+ /** Whether to auto-submit failures as feedback (default: false) */
1587
+ autoSubmitFeedback?: boolean;
1588
+ /** Whether feedback consent is given (default: false) */
1589
+ feedbackConsentGiven?: boolean;
1590
+ /** Whether to send alerts for critical failures (default: true) */
1591
+ alertOnCritical?: boolean;
1592
+ /** Cooldown between alerts for same probe in ms (default: 1 hour) */
1593
+ alertCooldownMs?: number;
1594
+ /** Probe IDs to skip (default: []) */
1595
+ disabledProbes?: string[];
1596
+ };
1597
+ /** Opt-in anonymous telemetry — sends usage heartbeats to help improve Instar */
1598
+ telemetry?: TelemetryConfig;
1599
+ /** Prompt Gate — detect and handle interactive prompts in sessions */
1600
+ promptGate?: {
1601
+ /** Enable prompt detection (default: false) */
1602
+ enabled?: boolean;
1603
+ /** Lines from buffer tail to examine (default: 50) */
1604
+ detectionWindowLines?: number;
1605
+ /** Auto-approve configuration */
1606
+ autoApprove?: {
1607
+ /** Enable auto-approval (default: false, opt-in) */
1608
+ enabled?: boolean;
1609
+ /** Auto-approve file creation in project dir (default: true) */
1610
+ fileCreation?: boolean;
1611
+ /** Auto-approve file edits in project dir (default: true) */
1612
+ fileEdits?: boolean;
1613
+ /** Auto-approve plan mode (default: true) */
1614
+ planApproval?: boolean;
1615
+ };
1616
+ /** Dry-run: log what would be auto-approved without acting (default: false) */
1617
+ dryRun?: boolean;
1618
+ /** Include human-readable summary in audit log (default: false) */
1619
+ verboseLogging?: boolean;
1620
+ /** Audit log retention in days (default: 30) */
1621
+ logRetentionDays?: number;
1622
+ /** Telegram user ID authorized to respond to relayed prompts */
1623
+ ownerId?: number;
1624
+ /** Relay timeout in seconds (default: 300) */
1625
+ relayTimeoutSeconds?: number;
1626
+ };
1627
+ }
1628
+ export type TelemetryLevel = 'basic' | 'usage';
1629
+ export interface TelemetryConfig {
1630
+ /** Whether telemetry is enabled (default: false — strictly opt-in) */
1631
+ enabled: boolean;
1632
+ /** What level of data to send (default: 'basic') */
1633
+ level?: TelemetryLevel;
1634
+ /** Heartbeat interval in milliseconds (default: 21600000 = 6 hours) */
1635
+ intervalMs?: number;
1636
+ /** Telemetry endpoint URL */
1637
+ endpoint?: string;
1638
+ }
1639
+ /**
1640
+ * Skip reason taxonomy for Baseline telemetry.
1641
+ * Maps to the telemetry-specific reasons that distinguish design problems
1642
+ * from correct behavior across the agent population.
1643
+ */
1644
+ export type BaselineSkipReason = 'quota' | 'priority' | 'cooldown' | 'disabled' | 'error' | 'stale-handoff';
1645
+ /** Per-job skip metrics for a submission window */
1646
+ export interface BaselineSkipMetric {
1647
+ slug: string;
1648
+ reason: BaselineSkipReason;
1649
+ count: number;
1650
+ }
1651
+ /** Per-job execution result metrics for a submission window */
1652
+ export interface BaselineResultMetric {
1653
+ slug: string;
1654
+ success: number;
1655
+ error: number;
1656
+ timeout: number;
1657
+ }
1658
+ /** Per-job duration metrics for a submission window */
1659
+ export interface BaselineDurationMetric {
1660
+ slug: string;
1661
+ meanMs: number;
1662
+ count: number;
1663
+ }
1664
+ /** Per-job model usage for a submission window */
1665
+ export interface BaselineModelMetric {
1666
+ slug: string;
1667
+ model: string;
1668
+ runCount: number;
1669
+ }
1670
+ /** Per-job schedule adherence for a submission window */
1671
+ export interface BaselineAdherenceMetric {
1672
+ slug: string;
1673
+ expectedRuns: number;
1674
+ actualRuns: number;
1675
+ }
1676
+ /** Watchdog intervention metrics for a Baseline submission window */
1677
+ export interface BaselineWatchdogMetrics {
1678
+ /** Total interventions in the submission window */
1679
+ interventions: number;
1680
+ /** Breakdown by escalation level (e.g., "ctrl-c": 3, "sigterm": 1) */
1681
+ byLevel: Record<string, number>;
1682
+ /** Sessions that recovered after intervention */
1683
+ recoveries: number;
1684
+ /** Sessions that died after intervention */
1685
+ deaths: number;
1686
+ /** Times the LLM gate classified a command as "legitimate" (no escalation) */
1687
+ llmGateOverrides: number;
1688
+ }
1689
+ /** Agent-level metrics for a Baseline submission */
1690
+ export interface BaselineAgentMetrics {
1691
+ version: string;
1692
+ nodeVersion: string;
1693
+ os: string;
1694
+ arch: string;
1695
+ uptimeHours: number;
1696
+ totalJobs: number;
1697
+ enabledJobs: number;
1698
+ disabledJobs: number;
1699
+ /** Curated feature flag whitelist — usage/adoption flags only */
1700
+ features: Record<string, boolean>;
1701
+ /** Coarse session activity bucket */
1702
+ sessionsBucket: '0' | '1-5' | '6-20' | '20+';
1703
+ /** Quota pressure signals */
1704
+ gateTriggersLast24h: number;
1705
+ blocksLast24h: number;
1706
+ /** Watchdog intervention metrics — optional for backward compatibility */
1707
+ watchdog?: BaselineWatchdogMetrics;
1708
+ /** Session recovery metrics (mechanical JSONL-based recovery) */
1709
+ recovery?: BaselineRecoveryMetrics;
1710
+ /** Triage orchestrator decision metrics */
1711
+ triage?: BaselineTriageMetrics;
1712
+ /** Notification batching effectiveness */
1713
+ notifications?: BaselineNotificationMetrics;
1714
+ /** Process staleness detection */
1715
+ staleness?: BaselineStalenessMetrics;
1716
+ }
1717
+ /** Mechanical session recovery metrics */
1718
+ export interface BaselineRecoveryMetrics {
1719
+ attempts: {
1720
+ stall: number;
1721
+ crash: number;
1722
+ errorLoop: number;
1723
+ };
1724
+ successes: {
1725
+ stall: number;
1726
+ crash: number;
1727
+ errorLoop: number;
1728
+ };
1729
+ }
1730
+ /** Triage orchestrator decision metrics */
1731
+ export interface BaselineTriageMetrics {
1732
+ activations: number;
1733
+ heuristicResolutions: number;
1734
+ llmResolutions: number;
1735
+ failures: number;
1736
+ actionCounts: Record<string, number>;
1737
+ }
1738
+ /** Notification batching metrics */
1739
+ export interface BaselineNotificationMetrics {
1740
+ flushed: number;
1741
+ suppressed: number;
1742
+ summaryQueueSize: number;
1743
+ digestQueueSize: number;
1744
+ }
1745
+ /** Process staleness metrics */
1746
+ export interface BaselineStalenessMetrics {
1747
+ versionMismatch: boolean;
1748
+ driftCount: number;
1749
+ }
1750
+ /** Full Baseline telemetry submission payload */
1751
+ export interface BaselineSubmission {
1752
+ v: 1;
1753
+ installationId: string;
1754
+ version: string;
1755
+ windowStart: string;
1756
+ windowEnd: string;
1757
+ agent: BaselineAgentMetrics;
1758
+ jobs: {
1759
+ skips: BaselineSkipMetric[];
1760
+ results: BaselineResultMetric[];
1761
+ durations: BaselineDurationMetric[];
1762
+ models: BaselineModelMetric[];
1763
+ adherence: BaselineAdherenceMetric[];
1764
+ };
1765
+ }
1766
+ /** @deprecated Use InstarConfig instead */
1767
+ export type AgentKitConfig = InstarConfig;
1768
+ export type AgentType = 'standalone' | 'project-bound';
1769
+ export type AgentStatus = 'running' | 'stopped' | 'stale';
1770
+ export interface AgentRegistryEntry {
1771
+ /** Agent display name (from config.json projectName) — NOT unique, display label only */
1772
+ name: string;
1773
+ /** Agent type */
1774
+ type: AgentType;
1775
+ /** Canonical absolute path — the TRUE unique key */
1776
+ path: string;
1777
+ /** Allocated server port */
1778
+ port: number;
1779
+ /** Process ID of the server (0 if stopped) */
1780
+ pid: number;
1781
+ /** Current status */
1782
+ status: AgentStatus;
1783
+ /** When this agent was first registered */
1784
+ createdAt: string;
1785
+ /** Last heartbeat timestamp */
1786
+ lastHeartbeat: string;
1787
+ /** Instar version this agent was created with */
1788
+ instarVersion?: string;
1789
+ }
1790
+ export interface AgentRegistry {
1791
+ /** Schema version for future migrations */
1792
+ version: 1;
1793
+ entries: AgentRegistryEntry[];
1794
+ }
1795
+ export interface BackupSnapshot {
1796
+ /** Timestamp-based ID (ISO format, filesystem-safe) */
1797
+ id: string;
1798
+ /** When this snapshot was created */
1799
+ createdAt: string;
1800
+ /** What triggered this snapshot */
1801
+ trigger: 'auto-session' | 'manual' | 'pre-update';
1802
+ /** Files included in this snapshot */
1803
+ files: string[];
1804
+ /** Total size in bytes */
1805
+ totalBytes: number;
1806
+ /** SHA-256 integrity hash for manifest validation */
1807
+ integrityHash?: string;
1808
+ }
1809
+ export interface BackupConfig {
1810
+ /** Whether auto-backup before sessions is enabled (default: true) */
1811
+ enabled: boolean;
1812
+ /** Maximum snapshots to retain (default: 20) */
1813
+ maxSnapshots: number;
1814
+ /** Files to include in backups (relative to .instar/) */
1815
+ includeFiles: string[];
1816
+ }
1817
+ export interface GitStateConfig {
1818
+ /** Whether git tracking is enabled */
1819
+ enabled: boolean;
1820
+ /** Remote URL for push/pull (optional) — only https://, git@, ssh:// allowed */
1821
+ remote?: string;
1822
+ /** Branch name (default: 'main') */
1823
+ branch: string;
1824
+ /** Auto-commit on state changes */
1825
+ autoCommit: boolean;
1826
+ /** Auto-push after commits (default: false) */
1827
+ autoPush: boolean;
1828
+ /** Debounce interval for auto-commits in seconds (default: 60) */
1829
+ commitDebounceSeconds: number;
1830
+ /** Last remote that was successfully pushed to (for first-push confirmation gate) */
1831
+ lastPushedRemote?: string;
1832
+ }
1833
+ export interface GitLogEntry {
1834
+ /** Commit hash (short) */
1835
+ hash: string;
1836
+ /** Commit message */
1837
+ message: string;
1838
+ /** Author name */
1839
+ author: string;
1840
+ /** Commit date */
1841
+ date: string;
1842
+ }
1843
+ export interface GitStatus {
1844
+ /** Whether git is initialized */
1845
+ initialized: boolean;
1846
+ /** Current branch name */
1847
+ branch: string;
1848
+ /** Number of staged files */
1849
+ staged: number;
1850
+ /** Number of modified but unstaged files */
1851
+ modified: number;
1852
+ /** Number of untracked files */
1853
+ untracked: number;
1854
+ /** Whether there are unpushed commits */
1855
+ ahead: number;
1856
+ /** Whether there are unpulled commits */
1857
+ behind: number;
1858
+ /** Remote URL if configured */
1859
+ remote?: string;
1860
+ }
1861
+ export interface MemorySearchConfig {
1862
+ /** Whether memory search is enabled */
1863
+ enabled: boolean;
1864
+ /** Path to the SQLite database */
1865
+ dbPath: string;
1866
+ /** Source files/directories to index (relative to .instar/) */
1867
+ sources: MemorySource[];
1868
+ /** Chunk size in approximate tokens (default: 400) */
1869
+ chunkSize: number;
1870
+ /** Chunk overlap in approximate tokens (default: 80) */
1871
+ chunkOverlap: number;
1872
+ /** Whether to index session logs (can be large) */
1873
+ indexSessionLogs: boolean;
1874
+ /** Temporal decay factor (0-1, how much to weight recency; default: 0.693 for 30-day half-life) */
1875
+ temporalDecayFactor: number;
1876
+ }
1877
+ export interface MemorySource {
1878
+ /** Relative path to file or directory */
1879
+ path: string;
1880
+ /** Source type affects chunking strategy */
1881
+ type: 'markdown' | 'json' | 'jsonl';
1882
+ /** Whether this source is "evergreen" (no temporal decay) */
1883
+ evergreen: boolean;
1884
+ }
1885
+ export interface MemorySearchResult {
1886
+ /** The matched text chunk */
1887
+ text: string;
1888
+ /** Source file path */
1889
+ source: string;
1890
+ /** Byte offset within the source file */
1891
+ offset: number;
1892
+ /** Relevance score (higher = more relevant) */
1893
+ score: number;
1894
+ /** FTS5 highlight with match markers */
1895
+ highlight?: string;
1896
+ /** When this chunk's source was last modified */
1897
+ sourceModifiedAt: string;
1898
+ }
1899
+ export interface MemoryIndexStats {
1900
+ /** Total number of indexed files */
1901
+ totalFiles: number;
1902
+ /** Total number of chunks */
1903
+ totalChunks: number;
1904
+ /** Database file size in bytes */
1905
+ dbSizeBytes: number;
1906
+ /** When the index was last updated */
1907
+ lastIndexedAt: string;
1908
+ /** Files that have changed since last index */
1909
+ staleFiles: number;
1910
+ /** Whether vector search is available */
1911
+ vectorSearchAvailable: boolean;
1912
+ }
1913
+ /**
1914
+ * Entity types for the semantic memory store.
1915
+ * Different knowledge needs different handling — facts decay faster
1916
+ * than lessons, people link to projects, patterns inform decisions.
1917
+ */
1918
+ export type EntityType = 'fact' | 'person' | 'project' | 'tool' | 'pattern' | 'decision' | 'lesson';
1919
+ /**
1920
+ * Relationship types between memory entities.
1921
+ * Enables meaningful graph traversal ("who built X?", "what depends on Y?").
1922
+ */
1923
+ export type RelationType = 'related_to' | 'built_by' | 'learned_from' | 'depends_on' | 'supersedes' | 'contradicts' | 'part_of' | 'used_in' | 'knows_about' | 'caused' | 'verified_by';
1924
+ /**
1925
+ * A knowledge entity in semantic memory.
1926
+ * Facts, people, projects, tools, patterns, decisions, lessons — anything
1927
+ * the agent knows, with confidence tracking and temporal metadata.
1928
+ */
1929
+ export interface MemoryEntity {
1930
+ id: string;
1931
+ type: EntityType;
1932
+ name: string;
1933
+ /** The actual knowledge content (markdown) */
1934
+ content: string;
1935
+ /** How confident the agent is in this knowledge (0.0-1.0) */
1936
+ confidence: number;
1937
+ createdAt: string;
1938
+ /** When this was last confirmed to be true */
1939
+ lastVerified: string;
1940
+ /** When this was last retrieved for a session */
1941
+ lastAccessed: string;
1942
+ /** Optional hard expiry (e.g., "API key rotates monthly") */
1943
+ expiresAt?: string;
1944
+ /** Where this came from ('session:ABC', 'observation', 'user:Justin') */
1945
+ source: string;
1946
+ /** Session ID that created this entity */
1947
+ sourceSession?: string;
1948
+ tags: string[];
1949
+ /** Domain grouping ('infrastructure', 'relationships', 'business') */
1950
+ domain?: string;
1951
+ /** User who owns this entity (null = agent-owned / shared) */
1952
+ ownerId?: string;
1953
+ /** Privacy scope controlling visibility (default: 'shared-project' for backward compat) */
1954
+ privacyScope?: PrivacyScopeType;
1955
+ }
1956
+ /**
1957
+ * A directional connection between two entities.
1958
+ */
1959
+ export interface MemoryEdge {
1960
+ id: string;
1961
+ fromId: string;
1962
+ toId: string;
1963
+ relation: RelationType;
1964
+ /** Connection strength (0.0-1.0) */
1965
+ weight: number;
1966
+ /** Why this connection exists */
1967
+ context?: string;
1968
+ createdAt: string;
1969
+ }
1970
+ /**
1971
+ * Entity with a computed retrieval score.
1972
+ */
1973
+ export interface ScoredEntity extends MemoryEntity {
1974
+ score: number;
1975
+ }
1976
+ /**
1977
+ * Entity with its connected neighbors.
1978
+ */
1979
+ export interface ConnectedEntity {
1980
+ entity: MemoryEntity;
1981
+ edge: MemoryEdge;
1982
+ direction: 'outgoing' | 'incoming';
1983
+ }
1984
+ /**
1985
+ * Report from confidence decay operation.
1986
+ */
1987
+ export interface DecayReport {
1988
+ entitiesProcessed: number;
1989
+ entitiesDecayed: number;
1990
+ entitiesExpired: number;
1991
+ minConfidence: number;
1992
+ maxConfidence: number;
1993
+ avgConfidence: number;
1994
+ }
1995
+ /**
1996
+ * Report from import operation.
1997
+ */
1998
+ export interface ImportReport {
1999
+ entitiesImported: number;
2000
+ edgesImported: number;
2001
+ entitiesSkipped: number;
2002
+ edgesSkipped: number;
2003
+ }
2004
+ /**
2005
+ * Statistics for the semantic memory store.
2006
+ */
2007
+ export interface SemanticMemoryStats {
2008
+ totalEntities: number;
2009
+ totalEdges: number;
2010
+ entityCountsByType: Record<EntityType, number>;
2011
+ avgConfidence: number;
2012
+ staleCount: number;
2013
+ dbSizeBytes: number;
2014
+ /** Whether vector search (sqlite-vec) is active */
2015
+ vectorSearchAvailable?: boolean;
2016
+ /** Number of entities with computed embeddings */
2017
+ embeddingCount?: number;
2018
+ }
2019
+ /**
2020
+ * Configuration for semantic memory.
2021
+ */
2022
+ export interface SemanticMemoryConfig {
2023
+ /** Path to SQLite database file */
2024
+ dbPath: string;
2025
+ /** Half-life for confidence decay in days (default: 30) */
2026
+ decayHalfLifeDays: number;
2027
+ /** Half-life for lessons (longer-lived knowledge, default: 90) */
2028
+ lessonDecayHalfLifeDays: number;
2029
+ /** Minimum confidence before an entity is considered stale (default: 0.2) */
2030
+ staleThreshold: number;
2031
+ }
2032
+ /**
2033
+ * Options for semantic memory search.
2034
+ */
2035
+ export interface SemanticSearchOptions {
2036
+ types?: EntityType[];
2037
+ domain?: string;
2038
+ minConfidence?: number;
2039
+ limit?: number;
2040
+ /** Filter to entities visible to this user (includes shared-project + user's private).
2041
+ * If not set, returns all entities (backward-compatible for single-user). */
2042
+ userId?: string;
2043
+ }
2044
+ /**
2045
+ * Options for graph traversal (explore).
2046
+ */
2047
+ export interface ExploreOptions {
2048
+ maxDepth?: number;
2049
+ relations?: RelationType[];
2050
+ minWeight?: number;
2051
+ }
2052
+ /**
2053
+ * Privacy scope for data items (memories, messages, entities).
2054
+ *
2055
+ * Controls who can see what:
2056
+ * - private: Only the owning user (identified by userId)
2057
+ * - shared-topic: All participants of a specific Telegram topic
2058
+ * - shared-project: All users of the agent (project-wide visibility)
2059
+ *
2060
+ * Default for new data: 'private' (fail-closed).
2061
+ * Agent-generated shared knowledge (tool docs, project facts): 'shared-project'.
2062
+ */
2063
+ export type PrivacyScopeType = 'private' | 'shared-topic' | 'shared-project';
2064
+ export interface PrivacyScope {
2065
+ /** Scope type */
2066
+ type: PrivacyScopeType;
2067
+ /** Owner user ID (required for 'private', optional for shared scopes) */
2068
+ ownerId?: string;
2069
+ /** Topic ID (required for 'shared-topic') */
2070
+ topicId?: number;
2071
+ }
2072
+ /**
2073
+ * Onboarding state for a user who is in the process of registering.
2074
+ * Gates messages during onboarding to prevent consent bypass (Gap 13).
2075
+ *
2076
+ * State machine:
2077
+ * unknown → pending → consented → authorized
2078
+ * ↘ rejected
2079
+ * unknown → authorized (admin pre-approved)
2080
+ */
2081
+ export type OnboardingState = 'unknown' | 'pending' | 'consented' | 'rejected' | 'authorized';
2082
+ /**
2083
+ * Tracks the onboarding process for a Telegram user.
2084
+ * Stored in-memory (not persisted — onboarding is transient).
2085
+ */
2086
+ export interface OnboardingSession {
2087
+ /** Telegram user ID */
2088
+ telegramUserId: number;
2089
+ /** Display name */
2090
+ name: string;
2091
+ /** Current onboarding state */
2092
+ state: OnboardingState;
2093
+ /** When onboarding started */
2094
+ startedAt: string;
2095
+ /** When the state last changed */
2096
+ updatedAt: string;
2097
+ /** Topic where onboarding is happening */
2098
+ topicId: number;
2099
+ /** Number of messages received while in pending state (for rate limiting) */
2100
+ pendingMessageCount: number;
2101
+ }
2102
+ /**
2103
+ * User data export for /mydata command (GDPR Article 15).
2104
+ */
2105
+ export interface UserDataExport {
2106
+ /** Export metadata */
2107
+ exportedAt: string;
2108
+ exportVersion: string;
2109
+ userId: string;
2110
+ /** User profile */
2111
+ profile: UserProfile;
2112
+ /** Conversation messages (from TopicMemory) */
2113
+ messages: {
2114
+ topicId: number;
2115
+ messageCount: number;
2116
+ messages: Array<{
2117
+ text: string;
2118
+ fromUser: boolean;
2119
+ timestamp: string;
2120
+ topicId: number;
2121
+ }>;
2122
+ }[];
2123
+ /** Semantic memory entities owned by this user */
2124
+ knowledgeEntities: Array<{
2125
+ name: string;
2126
+ type: string;
2127
+ content: string;
2128
+ createdAt: string;
2129
+ }>;
2130
+ /** Episodic memory digests from this user's sessions */
2131
+ activityDigests: Array<{
2132
+ summary: string;
2133
+ startedAt: string;
2134
+ endedAt: string;
2135
+ themes: string[];
2136
+ }>;
2137
+ }
2138
+ /**
2139
+ * Result of a /forget (erasure) operation (GDPR Article 17).
2140
+ */
2141
+ export interface UserErasureResult {
2142
+ userId: string;
2143
+ erasedAt: string;
2144
+ /** Number of messages deleted from TopicMemory */
2145
+ messagesDeleted: number;
2146
+ /** Number of semantic entities deleted */
2147
+ entitiesDeleted: number;
2148
+ /** Number of episodic digests deleted */
2149
+ digestsDeleted: number;
2150
+ /** Whether the user profile was removed */
2151
+ profileRemoved: boolean;
2152
+ /** Items that could not be erased (e.g., shared-project entities) */
2153
+ retainedItems: Array<{
2154
+ type: string;
2155
+ reason: string;
2156
+ count: number;
2157
+ }>;
2158
+ }
2159
+ //# sourceMappingURL=types.d.ts.map