@marifold/core 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/LICENSE +674 -0
  2. package/dist/agent/AgentEvents.d.ts +106 -0
  3. package/dist/agent/AgentEvents.d.ts.map +1 -0
  4. package/dist/agent/AgentEvents.js +3 -0
  5. package/dist/agent/AgentEvents.js.map +1 -0
  6. package/dist/agent/AgentHistory.d.ts +27 -0
  7. package/dist/agent/AgentHistory.d.ts.map +1 -0
  8. package/dist/agent/AgentHistory.js +42 -0
  9. package/dist/agent/AgentHistory.js.map +1 -0
  10. package/dist/agent/AgentRunner.d.ts +149 -0
  11. package/dist/agent/AgentRunner.d.ts.map +1 -0
  12. package/dist/agent/AgentRunner.js +727 -0
  13. package/dist/agent/AgentRunner.js.map +1 -0
  14. package/dist/agent/ApprovalPolicy.d.ts +71 -0
  15. package/dist/agent/ApprovalPolicy.d.ts.map +1 -0
  16. package/dist/agent/ApprovalPolicy.js +29 -0
  17. package/dist/agent/ApprovalPolicy.js.map +1 -0
  18. package/dist/agent/ControlBlockTools.d.ts +9 -0
  19. package/dist/agent/ControlBlockTools.d.ts.map +1 -0
  20. package/dist/agent/ControlBlockTools.js +49 -0
  21. package/dist/agent/ControlBlockTools.js.map +1 -0
  22. package/dist/agent/RunWorkspace.d.ts +92 -0
  23. package/dist/agent/RunWorkspace.d.ts.map +1 -0
  24. package/dist/agent/RunWorkspace.js +328 -0
  25. package/dist/agent/RunWorkspace.js.map +1 -0
  26. package/dist/agent/ScopedProcess.d.ts +35 -0
  27. package/dist/agent/ScopedProcess.d.ts.map +1 -0
  28. package/dist/agent/ScopedProcess.js +280 -0
  29. package/dist/agent/ScopedProcess.js.map +1 -0
  30. package/dist/agent/ToolRegistry.d.ts +80 -0
  31. package/dist/agent/ToolRegistry.d.ts.map +1 -0
  32. package/dist/agent/ToolRegistry.js +45 -0
  33. package/dist/agent/ToolRegistry.js.map +1 -0
  34. package/dist/agent/UserInput.d.ts +59 -0
  35. package/dist/agent/UserInput.d.ts.map +1 -0
  36. package/dist/agent/UserInput.js +203 -0
  37. package/dist/agent/UserInput.js.map +1 -0
  38. package/dist/agent/tools/AskUserTool.d.ts +71 -0
  39. package/dist/agent/tools/AskUserTool.d.ts.map +1 -0
  40. package/dist/agent/tools/AskUserTool.js +70 -0
  41. package/dist/agent/tools/AskUserTool.js.map +1 -0
  42. package/dist/agent/tools/DelegateTool.d.ts +49 -0
  43. package/dist/agent/tools/DelegateTool.d.ts.map +1 -0
  44. package/dist/agent/tools/DelegateTool.js +62 -0
  45. package/dist/agent/tools/DelegateTool.js.map +1 -0
  46. package/dist/agent/tools/InspectAttachmentTool.d.ts +25 -0
  47. package/dist/agent/tools/InspectAttachmentTool.d.ts.map +1 -0
  48. package/dist/agent/tools/InspectAttachmentTool.js +129 -0
  49. package/dist/agent/tools/InspectAttachmentTool.js.map +1 -0
  50. package/dist/agent/tools/PythonPackageTool.d.ts +26 -0
  51. package/dist/agent/tools/PythonPackageTool.d.ts.map +1 -0
  52. package/dist/agent/tools/PythonPackageTool.js +105 -0
  53. package/dist/agent/tools/PythonPackageTool.js.map +1 -0
  54. package/dist/agent/tools/ReadFileTool.d.ts +24 -0
  55. package/dist/agent/tools/ReadFileTool.d.ts.map +1 -0
  56. package/dist/agent/tools/ReadFileTool.js +112 -0
  57. package/dist/agent/tools/ReadFileTool.js.map +1 -0
  58. package/dist/agent/tools/ShellExecTool.d.ts +23 -0
  59. package/dist/agent/tools/ShellExecTool.d.ts.map +1 -0
  60. package/dist/agent/tools/ShellExecTool.js +75 -0
  61. package/dist/agent/tools/ShellExecTool.js.map +1 -0
  62. package/dist/agent/tools/WebSearchTool.d.ts +26 -0
  63. package/dist/agent/tools/WebSearchTool.d.ts.map +1 -0
  64. package/dist/agent/tools/WebSearchTool.js +52 -0
  65. package/dist/agent/tools/WebSearchTool.js.map +1 -0
  66. package/dist/agent/tools/WriteFileTool.d.ts +30 -0
  67. package/dist/agent/tools/WriteFileTool.d.ts.map +1 -0
  68. package/dist/agent/tools/WriteFileTool.js +155 -0
  69. package/dist/agent/tools/WriteFileTool.js.map +1 -0
  70. package/dist/app/AppActionResolver.d.ts +15 -0
  71. package/dist/app/AppActionResolver.d.ts.map +1 -0
  72. package/dist/app/AppActionResolver.js +98 -0
  73. package/dist/app/AppActionResolver.js.map +1 -0
  74. package/dist/app/AppSchema.d.ts +83 -0
  75. package/dist/app/AppSchema.d.ts.map +1 -0
  76. package/dist/app/AppSchema.js +17 -0
  77. package/dist/app/AppSchema.js.map +1 -0
  78. package/dist/app/AppStore.d.ts +14 -0
  79. package/dist/app/AppStore.d.ts.map +1 -0
  80. package/dist/app/AppStore.js +146 -0
  81. package/dist/app/AppStore.js.map +1 -0
  82. package/dist/app/AppValidator.d.ts +10 -0
  83. package/dist/app/AppValidator.d.ts.map +1 -0
  84. package/dist/app/AppValidator.js +503 -0
  85. package/dist/app/AppValidator.js.map +1 -0
  86. package/dist/app/SkillAppCompiler.d.ts +5 -0
  87. package/dist/app/SkillAppCompiler.d.ts.map +1 -0
  88. package/dist/app/SkillAppCompiler.js +632 -0
  89. package/dist/app/SkillAppCompiler.js.map +1 -0
  90. package/dist/app/SkillAppDsl.d.ts +93 -0
  91. package/dist/app/SkillAppDsl.d.ts.map +1 -0
  92. package/dist/app/SkillAppDsl.js +72 -0
  93. package/dist/app/SkillAppDsl.js.map +1 -0
  94. package/dist/app/SkillAppInstanceRegistry.d.ts +25 -0
  95. package/dist/app/SkillAppInstanceRegistry.d.ts.map +1 -0
  96. package/dist/app/SkillAppInstanceRegistry.js +218 -0
  97. package/dist/app/SkillAppInstanceRegistry.js.map +1 -0
  98. package/dist/app/SkillAppResolver.d.ts +12 -0
  99. package/dist/app/SkillAppResolver.d.ts.map +1 -0
  100. package/dist/app/SkillAppResolver.js +89 -0
  101. package/dist/app/SkillAppResolver.js.map +1 -0
  102. package/dist/app/SkillAppSchema.d.ts +116 -0
  103. package/dist/app/SkillAppSchema.d.ts.map +1 -0
  104. package/dist/app/SkillAppSchema.js +5 -0
  105. package/dist/app/SkillAppSchema.js.map +1 -0
  106. package/dist/channels/TelegramBridge.d.ts +103 -0
  107. package/dist/channels/TelegramBridge.d.ts.map +1 -0
  108. package/dist/channels/TelegramBridge.js +565 -0
  109. package/dist/channels/TelegramBridge.js.map +1 -0
  110. package/dist/channels/respond.d.ts +46 -0
  111. package/dist/channels/respond.d.ts.map +1 -0
  112. package/dist/channels/respond.js +41 -0
  113. package/dist/channels/respond.js.map +1 -0
  114. package/dist/config/ChatGptTokenRefresh.d.ts +18 -0
  115. package/dist/config/ChatGptTokenRefresh.d.ts.map +1 -0
  116. package/dist/config/ChatGptTokenRefresh.js +63 -0
  117. package/dist/config/ChatGptTokenRefresh.js.map +1 -0
  118. package/dist/config/ConfigBackup.d.ts +20 -0
  119. package/dist/config/ConfigBackup.d.ts.map +1 -0
  120. package/dist/config/ConfigBackup.js +197 -0
  121. package/dist/config/ConfigBackup.js.map +1 -0
  122. package/dist/config/ConfigLoader.d.ts +28 -0
  123. package/dist/config/ConfigLoader.d.ts.map +1 -0
  124. package/dist/config/ConfigLoader.js +335 -0
  125. package/dist/config/ConfigLoader.js.map +1 -0
  126. package/dist/config/ConfigManager.d.ts +55 -0
  127. package/dist/config/ConfigManager.d.ts.map +1 -0
  128. package/dist/config/ConfigManager.js +707 -0
  129. package/dist/config/ConfigManager.js.map +1 -0
  130. package/dist/config/ConfigSchema.d.ts +231 -0
  131. package/dist/config/ConfigSchema.d.ts.map +1 -0
  132. package/dist/config/ConfigSchema.js +15 -0
  133. package/dist/config/ConfigSchema.js.map +1 -0
  134. package/dist/config/GitHubCopilotAuth.d.ts +7 -0
  135. package/dist/config/GitHubCopilotAuth.d.ts.map +1 -0
  136. package/dist/config/GitHubCopilotAuth.js +40 -0
  137. package/dist/config/GitHubCopilotAuth.js.map +1 -0
  138. package/dist/config/MarifoldOpenAICompatProvider.d.ts +39 -0
  139. package/dist/config/MarifoldOpenAICompatProvider.d.ts.map +1 -0
  140. package/dist/config/MarifoldOpenAICompatProvider.js +158 -0
  141. package/dist/config/MarifoldOpenAICompatProvider.js.map +1 -0
  142. package/dist/config/OpenAICompatUrls.d.ts +7 -0
  143. package/dist/config/OpenAICompatUrls.d.ts.map +1 -0
  144. package/dist/config/OpenAICompatUrls.js +47 -0
  145. package/dist/config/OpenAICompatUrls.js.map +1 -0
  146. package/dist/config/ProviderFactory.d.ts +12 -0
  147. package/dist/config/ProviderFactory.d.ts.map +1 -0
  148. package/dist/config/ProviderFactory.js +61 -0
  149. package/dist/config/ProviderFactory.js.map +1 -0
  150. package/dist/config/ProviderInspector.d.ts +46 -0
  151. package/dist/config/ProviderInspector.d.ts.map +1 -0
  152. package/dist/config/ProviderInspector.js +356 -0
  153. package/dist/config/ProviderInspector.js.map +1 -0
  154. package/dist/config/ProviderRegistry.d.ts +19 -0
  155. package/dist/config/ProviderRegistry.d.ts.map +1 -0
  156. package/dist/config/ProviderRegistry.js +301 -0
  157. package/dist/config/ProviderRegistry.js.map +1 -0
  158. package/dist/config/XaiTokenRefresh.d.ts +15 -0
  159. package/dist/config/XaiTokenRefresh.d.ts.map +1 -0
  160. package/dist/config/XaiTokenRefresh.js +73 -0
  161. package/dist/config/XaiTokenRefresh.js.map +1 -0
  162. package/dist/errors/MarifoldError.d.ts +34 -0
  163. package/dist/errors/MarifoldError.d.ts.map +1 -0
  164. package/dist/errors/MarifoldError.js +100 -0
  165. package/dist/errors/MarifoldError.js.map +1 -0
  166. package/dist/images/ImageOptimizer.d.ts +34 -0
  167. package/dist/images/ImageOptimizer.d.ts.map +1 -0
  168. package/dist/images/ImageOptimizer.js +225 -0
  169. package/dist/images/ImageOptimizer.js.map +1 -0
  170. package/dist/index.d.ts +96 -0
  171. package/dist/index.d.ts.map +1 -0
  172. package/dist/index.js +193 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/memory/MemoryControls.d.ts +26 -0
  175. package/dist/memory/MemoryControls.d.ts.map +1 -0
  176. package/dist/memory/MemoryControls.js +388 -0
  177. package/dist/memory/MemoryControls.js.map +1 -0
  178. package/dist/memory/MemoryStore.d.ts +122 -0
  179. package/dist/memory/MemoryStore.d.ts.map +1 -0
  180. package/dist/memory/MemoryStore.js +1096 -0
  181. package/dist/memory/MemoryStore.js.map +1 -0
  182. package/dist/profiles/ProfileManager.d.ts +139 -0
  183. package/dist/profiles/ProfileManager.d.ts.map +1 -0
  184. package/dist/profiles/ProfileManager.js +475 -0
  185. package/dist/profiles/ProfileManager.js.map +1 -0
  186. package/dist/profiles/ProfileResolver.d.ts +18 -0
  187. package/dist/profiles/ProfileResolver.d.ts.map +1 -0
  188. package/dist/profiles/ProfileResolver.js +280 -0
  189. package/dist/profiles/ProfileResolver.js.map +1 -0
  190. package/dist/runs/RunRegistry.d.ts +140 -0
  191. package/dist/runs/RunRegistry.d.ts.map +1 -0
  192. package/dist/runs/RunRegistry.js +432 -0
  193. package/dist/runs/RunRegistry.js.map +1 -0
  194. package/dist/runtime/MarifoldRuntime.d.ts +244 -0
  195. package/dist/runtime/MarifoldRuntime.d.ts.map +1 -0
  196. package/dist/runtime/MarifoldRuntime.js +1099 -0
  197. package/dist/runtime/MarifoldRuntime.js.map +1 -0
  198. package/dist/runtime/MarifoldTypes.d.ts +70 -0
  199. package/dist/runtime/MarifoldTypes.d.ts.map +1 -0
  200. package/dist/runtime/MarifoldTypes.js +3 -0
  201. package/dist/runtime/MarifoldTypes.js.map +1 -0
  202. package/dist/schedule/ScheduleStore.d.ts +60 -0
  203. package/dist/schedule/ScheduleStore.d.ts.map +1 -0
  204. package/dist/schedule/ScheduleStore.js +212 -0
  205. package/dist/schedule/ScheduleStore.js.map +1 -0
  206. package/dist/schedule/Scheduler.d.ts +28 -0
  207. package/dist/schedule/Scheduler.d.ts.map +1 -0
  208. package/dist/schedule/Scheduler.js +65 -0
  209. package/dist/schedule/Scheduler.js.map +1 -0
  210. package/dist/search/DuckDuckGoBackend.d.ts +18 -0
  211. package/dist/search/DuckDuckGoBackend.d.ts.map +1 -0
  212. package/dist/search/DuckDuckGoBackend.js +37 -0
  213. package/dist/search/DuckDuckGoBackend.js.map +1 -0
  214. package/dist/search/FirecrawlBackend.d.ts +28 -0
  215. package/dist/search/FirecrawlBackend.d.ts.map +1 -0
  216. package/dist/search/FirecrawlBackend.js +76 -0
  217. package/dist/search/FirecrawlBackend.js.map +1 -0
  218. package/dist/search/SearchBackend.d.ts +18 -0
  219. package/dist/search/SearchBackend.d.ts.map +1 -0
  220. package/dist/search/SearchBackend.js +24 -0
  221. package/dist/search/SearchBackend.js.map +1 -0
  222. package/dist/search/createSearchBackend.d.ts +16 -0
  223. package/dist/search/createSearchBackend.d.ts.map +1 -0
  224. package/dist/search/createSearchBackend.js +30 -0
  225. package/dist/search/createSearchBackend.js.map +1 -0
  226. package/dist/sessions/ResponseMetrics.d.ts +17 -0
  227. package/dist/sessions/ResponseMetrics.d.ts.map +1 -0
  228. package/dist/sessions/ResponseMetrics.js +3 -0
  229. package/dist/sessions/ResponseMetrics.js.map +1 -0
  230. package/dist/sessions/SessionResolver.d.ts +135 -0
  231. package/dist/sessions/SessionResolver.d.ts.map +1 -0
  232. package/dist/sessions/SessionResolver.js +1173 -0
  233. package/dist/sessions/SessionResolver.js.map +1 -0
  234. package/dist/skill/BuiltInSkillManager.d.ts +11 -0
  235. package/dist/skill/BuiltInSkillManager.d.ts.map +1 -0
  236. package/dist/skill/BuiltInSkillManager.js +98 -0
  237. package/dist/skill/BuiltInSkillManager.js.map +1 -0
  238. package/dist/skill/SkillInvocation.d.ts +30 -0
  239. package/dist/skill/SkillInvocation.d.ts.map +1 -0
  240. package/dist/skill/SkillInvocation.js +135 -0
  241. package/dist/skill/SkillInvocation.js.map +1 -0
  242. package/dist/skill/SkillSchema.d.ts +37 -0
  243. package/dist/skill/SkillSchema.d.ts.map +1 -0
  244. package/dist/skill/SkillSchema.js +26 -0
  245. package/dist/skill/SkillSchema.js.map +1 -0
  246. package/dist/skill/SkillStore.d.ts +41 -0
  247. package/dist/skill/SkillStore.d.ts.map +1 -0
  248. package/dist/skill/SkillStore.js +184 -0
  249. package/dist/skill/SkillStore.js.map +1 -0
  250. package/dist/skill/SkillTemplater.d.ts +19 -0
  251. package/dist/skill/SkillTemplater.d.ts.map +1 -0
  252. package/dist/skill/SkillTemplater.js +36 -0
  253. package/dist/skill/SkillTemplater.js.map +1 -0
  254. package/dist/skill/SkillValidator.d.ts +10 -0
  255. package/dist/skill/SkillValidator.d.ts.map +1 -0
  256. package/dist/skill/SkillValidator.js +131 -0
  257. package/dist/skill/SkillValidator.js.map +1 -0
  258. package/dist/skill/SkillVars.d.ts +10 -0
  259. package/dist/skill/SkillVars.d.ts.map +1 -0
  260. package/dist/skill/SkillVars.js +65 -0
  261. package/dist/skill/SkillVars.js.map +1 -0
  262. package/dist/skill/index.d.ts +10 -0
  263. package/dist/skill/index.d.ts.map +1 -0
  264. package/dist/skill/index.js +22 -0
  265. package/dist/skill/index.js.map +1 -0
  266. package/dist/skillapp/SkillAppActionResolver.d.ts +13 -0
  267. package/dist/skillapp/SkillAppActionResolver.d.ts.map +1 -0
  268. package/dist/skillapp/SkillAppActionResolver.js +95 -0
  269. package/dist/skillapp/SkillAppActionResolver.js.map +1 -0
  270. package/dist/skillapp/SkillAppSchema.d.ts +79 -0
  271. package/dist/skillapp/SkillAppSchema.d.ts.map +1 -0
  272. package/dist/skillapp/SkillAppSchema.js +20 -0
  273. package/dist/skillapp/SkillAppSchema.js.map +1 -0
  274. package/dist/skillapp/SkillAppStore.d.ts +11 -0
  275. package/dist/skillapp/SkillAppStore.d.ts.map +1 -0
  276. package/dist/skillapp/SkillAppStore.js +98 -0
  277. package/dist/skillapp/SkillAppStore.js.map +1 -0
  278. package/dist/skillapp/SkillAppValidator.d.ts +10 -0
  279. package/dist/skillapp/SkillAppValidator.d.ts.map +1 -0
  280. package/dist/skillapp/SkillAppValidator.js +522 -0
  281. package/dist/skillapp/SkillAppValidator.js.map +1 -0
  282. package/dist/tasks/TaskStore.d.ts +110 -0
  283. package/dist/tasks/TaskStore.d.ts.map +1 -0
  284. package/dist/tasks/TaskStore.js +371 -0
  285. package/dist/tasks/TaskStore.js.map +1 -0
  286. package/dist/util/fetchRetry.d.ts +11 -0
  287. package/dist/util/fetchRetry.d.ts.map +1 -0
  288. package/dist/util/fetchRetry.js +48 -0
  289. package/dist/util/fetchRetry.js.map +1 -0
  290. package/dist/util/idToken.d.ts +12 -0
  291. package/dist/util/idToken.d.ts.map +1 -0
  292. package/dist/util/idToken.js +32 -0
  293. package/dist/util/idToken.js.map +1 -0
  294. package/dist/util/proxy.d.ts +18 -0
  295. package/dist/util/proxy.d.ts.map +1 -0
  296. package/dist/util/proxy.js +28 -0
  297. package/dist/util/proxy.js.map +1 -0
  298. package/dist/workspace/Workspace.d.ts +9 -0
  299. package/dist/workspace/Workspace.d.ts.map +1 -0
  300. package/dist/workspace/Workspace.js +55 -0
  301. package/dist/workspace/Workspace.js.map +1 -0
  302. package/dist/workspace/WorkspaceInitializer.d.ts +40 -0
  303. package/dist/workspace/WorkspaceInitializer.d.ts.map +1 -0
  304. package/dist/workspace/WorkspaceInitializer.js +212 -0
  305. package/dist/workspace/WorkspaceInitializer.js.map +1 -0
  306. package/dist/workspace/WorkspacePaths.d.ts +11 -0
  307. package/dist/workspace/WorkspacePaths.d.ts.map +1 -0
  308. package/dist/workspace/WorkspacePaths.js +82 -0
  309. package/dist/workspace/WorkspacePaths.js.map +1 -0
  310. package/package.json +36 -0
@@ -0,0 +1,106 @@
1
+ import { JSONValue } from '@priest-ai/core';
2
+ import { TaskPlanItem, TaskStatus, TaskStepStatus } from '../tasks/TaskStore';
3
+ import { ApprovalRequest } from './ApprovalPolicy';
4
+ import type { AgentToolKind } from './ToolRegistry';
5
+ import type { UserInputRequest, UserInputResponse } from './UserInput';
6
+ /** Token usage accumulated over an agent run's model calls (optional planning
7
+ * and loop turns), as reported by the provider. Fields are undefined when the
8
+ * provider does not report usage (e.g. some local models). */
9
+ export interface AgentUsage {
10
+ inputTokens?: number;
11
+ outputTokens?: number;
12
+ totalTokens?: number;
13
+ /** Portion of inputTokens served from the provider's prompt cache, when reported. */
14
+ cachedInputTokens?: number;
15
+ /** Portion of outputTokens used for provider reasoning, when reported. */
16
+ reasoningTokens?: number;
17
+ estimatedCostUSD?: number;
18
+ }
19
+ /**
20
+ * Renderer-agnostic agent run events. This union is the contract the CLI, TUI,
21
+ * Web UI, service API, and future clients consume,
22
+ * so keep payloads self-describing and free of terminal formatting.
23
+ */
24
+ export type AgentEvent = {
25
+ type: 'status';
26
+ taskId: string;
27
+ status: TaskStatus;
28
+ } | {
29
+ type: 'plan';
30
+ taskId: string;
31
+ plan: TaskPlanItem[];
32
+ } | {
33
+ type: 'step';
34
+ taskId: string;
35
+ stepId: string;
36
+ text: string;
37
+ status: TaskStepStatus;
38
+ } | {
39
+ type: 'text';
40
+ text: string;
41
+ /** `progress` is model commentary before a tool call; `final` is the
42
+ * completed answer. Omitted events from older clients are final. */
43
+ phase?: 'progress' | 'final';
44
+ }
45
+ /** Provider-supplied safe reasoning summary. Opaque/private reasoning state
46
+ * never crosses the renderer contract. */
47
+ | {
48
+ type: 'reasoning';
49
+ summary: string;
50
+ }
51
+ /** User guidance queued mid-run (`/btw` or a service steer call), emitted
52
+ * when the runner drains it — so every attached client sees it in context. */
53
+ | {
54
+ type: 'steering';
55
+ taskId: string;
56
+ text: string;
57
+ } | {
58
+ type: 'tool_request';
59
+ call: {
60
+ id: string;
61
+ tool: string;
62
+ kind: AgentToolKind;
63
+ input: Record<string, JSONValue>;
64
+ summary: string;
65
+ };
66
+ } | {
67
+ type: 'approval_request';
68
+ request: ApprovalRequest;
69
+ } | {
70
+ type: 'approval_decision';
71
+ requestId: string;
72
+ approved: boolean;
73
+ source: 'policy' | 'user';
74
+ reason?: string;
75
+ } | {
76
+ type: 'user_input_request';
77
+ request: UserInputRequest;
78
+ } | {
79
+ type: 'user_input_response';
80
+ response: UserInputResponse;
81
+ } | {
82
+ type: 'tool_result';
83
+ callId: string;
84
+ tool: string;
85
+ summary: string;
86
+ isError: boolean;
87
+ }
88
+ /** @deprecated Kept for wire/source compatibility with pre-v0.24.2 runners.
89
+ * Current runners verify observable behavior through normal tool calls and
90
+ * never emit a separate model-authored self-grade. */
91
+ | {
92
+ type: 'verification';
93
+ passed: boolean;
94
+ notes: string;
95
+ } | {
96
+ type: 'error';
97
+ code: string;
98
+ message: string;
99
+ } | {
100
+ type: 'done';
101
+ taskId: string;
102
+ status: TaskStatus;
103
+ summary?: string;
104
+ usage?: AgentUsage;
105
+ };
106
+ //# sourceMappingURL=AgentEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentEvents.d.ts","sourceRoot":"","sources":["../../src/agent/AgentEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEvE;;8DAE8D;AAC9D,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU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qB,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE;AAC1F;;sDAEsD;GACpD;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AgentEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentEvents.js","sourceRoot":"","sources":["../../src/agent/AgentEvents.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Bounded cross-objective memory for agent runs.
3
+ *
4
+ * Agent mode is stateless by default: the engine has no session store, so a
5
+ * regular objective sees only `system + objective` and can't reference a prior
6
+ * turn ("save the above prompt" → it can't see the prompt). For NON-lean tasks
7
+ * we inject a bounded window of the recent clean session pairs (objective →
8
+ * final answer, the ones `appendExchange` persists — never raw tool framing) so
9
+ * the agent has working memory of the conversation. Lean/skill runs stay
10
+ * stateless (isolated, subagent-style).
11
+ *
12
+ * Deterministic window — keeps the most recent turns within a char budget, no
13
+ * model call, no fidelity-loss from summarization. The clean pairs are already
14
+ * compact, so a window is a sound, reliable bound (summarization can come later
15
+ * if depth ever demands it).
16
+ */
17
+ export interface HistoryTurn {
18
+ role: 'user' | 'assistant';
19
+ content: string;
20
+ }
21
+ /**
22
+ * Build the "earlier conversation" context block from clean session turns,
23
+ * keeping the most recent turns that fit within `budgetChars` (always at least
24
+ * the single most recent turn). Returns undefined when there's nothing to add.
25
+ */
26
+ export declare function buildHistoryContext(turns: HistoryTurn[], budgetChars: number): string | undefined;
27
+ //# sourceMappingURL=AgentHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentHistory.d.ts","sourceRoot":"","sources":["../../src/agent/AgentHistory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAID;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAajG"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * Bounded cross-objective memory for agent runs.
4
+ *
5
+ * Agent mode is stateless by default: the engine has no session store, so a
6
+ * regular objective sees only `system + objective` and can't reference a prior
7
+ * turn ("save the above prompt" → it can't see the prompt). For NON-lean tasks
8
+ * we inject a bounded window of the recent clean session pairs (objective →
9
+ * final answer, the ones `appendExchange` persists — never raw tool framing) so
10
+ * the agent has working memory of the conversation. Lean/skill runs stay
11
+ * stateless (isolated, subagent-style).
12
+ *
13
+ * Deterministic window — keeps the most recent turns within a char budget, no
14
+ * model call, no fidelity-loss from summarization. The clean pairs are already
15
+ * compact, so a window is a sound, reliable bound (summarization can come later
16
+ * if depth ever demands it).
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.buildHistoryContext = buildHistoryContext;
20
+ const HISTORY_HEADER = '## Earlier in this conversation\n\n';
21
+ /**
22
+ * Build the "earlier conversation" context block from clean session turns,
23
+ * keeping the most recent turns that fit within `budgetChars` (always at least
24
+ * the single most recent turn). Returns undefined when there's nothing to add.
25
+ */
26
+ function buildHistoryContext(turns, budgetChars) {
27
+ if (turns.length === 0 || budgetChars <= 0)
28
+ return undefined;
29
+ const kept = [];
30
+ let used = 0;
31
+ for (let i = turns.length - 1; i >= 0; i -= 1) {
32
+ const turn = turns[i];
33
+ const cost = turn.content.length + turn.role.length + 4;
34
+ if (used + cost > budgetChars && kept.length > 0)
35
+ break;
36
+ kept.unshift(turn);
37
+ used += cost;
38
+ }
39
+ const body = kept.map(t => `${t.role === 'user' ? 'User' : 'Assistant'}: ${t.content}`).join('\n\n');
40
+ return HISTORY_HEADER + body;
41
+ }
42
+ //# sourceMappingURL=AgentHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentHistory.js","sourceRoot":"","sources":["../../src/agent/AgentHistory.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAOH,MAAM,cAAc,GAAG,qCAAqC,CAAC;AAE7D;;;;GAIG;AACH,6BAAoC,KAAoB,EAAE,WAAmB;IAC3E,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7D,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACxD,IAAI,IAAI,GAAG,IAAI,GAAG,WAAW,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM;QACxD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnB,IAAI,IAAI,IAAI,CAAC;IACf,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrG,OAAO,cAAc,GAAG,IAAI,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,149 @@
1
+ import { ImageInput, PriestConfig, PriestRequest, PriestResponse } from '@priest-ai/core';
2
+ import { HistoryTurn } from './AgentHistory';
3
+ import { MarifoldResolvedSettings, MarifoldRunRequest } from '../runtime/MarifoldTypes';
4
+ import { TaskStore } from '../tasks/TaskStore';
5
+ import { AgentEvent } from './AgentEvents';
6
+ import { AgentToolMode, ApprovalHandler, MarifoldAgentConfig } from './ApprovalPolicy';
7
+ import { RunFileInput } from './RunWorkspace';
8
+ import { ToolRegistry } from './ToolRegistry';
9
+ import type { UserInputHandler } from './UserInput';
10
+ import type { ResponseMetrics } from '../sessions/ResponseMetrics';
11
+ export interface AgentRunOptions {
12
+ objective: string;
13
+ profile?: string;
14
+ provider?: string;
15
+ model?: string;
16
+ /** Images attached to the objective. Agent runs stage them read-only and
17
+ * expose them lazily through inspect_attachment; chat remains native. */
18
+ images?: ImageInput[];
19
+ /** Preserve the attached images' original encoded bytes for this turn. */
20
+ originalImages?: boolean;
21
+ /** Conversation session id. When set, a single clean turn pair (the user's
22
+ * text + the terminal outcome) is persisted so the session can be resumed. */
23
+ sessionId?: string;
24
+ /** Replace this persisted user→assistant exchange in place. Later turns are
25
+ * preserved and excluded from this run's history context. */
26
+ replaceUserTurnIndex?: number;
27
+ /** Text to store as the user turn on resume (e.g. the full `$skill …`
28
+ * invocation). Defaults to `objective` when omitted. */
29
+ userTurn?: string;
30
+ /** Lean run (e.g. a skill): keep tools (so it can read bundled files) but skip
31
+ * the optional planning pass and verbose agent framing, and ask for only the
32
+ * final output. Cuts token cost sharply without changing the result. */
33
+ lean?: boolean;
34
+ /** Force a planning pass before the loop. Off by default (adaptive: the model
35
+ * plans inline only when the task warrants it). The TUI's `/steps` sets this
36
+ * for one turn; weak models can force it via config. */
37
+ forcePlan?: boolean;
38
+ /** Working directory for filesystem/shell tools. Defaults to process.cwd(). */
39
+ cwd?: string;
40
+ /** Stable id used for ~/.marifold/runs/<id>. Service runs pass their public
41
+ * run id; direct runs fall back to the task id. */
42
+ executionId?: string;
43
+ /** Binary files staged read-only under this run's input directory. */
44
+ files?: RunFileInput[];
45
+ /** Extra trusted folders for this run only, merged over the profile's.
46
+ * In-home writes are auto-approved; external folders remain per-call
47
+ * approval-gated. Used by channels for scratch/outbox capabilities. */
48
+ trustedFolders?: string[];
49
+ /** Per-run thinking-mode override (honored by think-capable providers). */
50
+ think?: boolean;
51
+ /** Authoritative instructions (e.g. a skill body) injected at the top of the
52
+ * system prompt for every loop turn, so the run is guided by them. */
53
+ instructions?: string[];
54
+ /** Resolves 'ask' approvals. Absent (unattended runs): 'ask' degrades to deny. */
55
+ approvalHandler?: ApprovalHandler;
56
+ /** Resolves optional model-authored clarification questions. Absent or
57
+ * unattended runs return an immediate unavailable result to the model. */
58
+ userInputHandler?: UserInputHandler;
59
+ signal?: AbortSignal;
60
+ maxIterations?: number;
61
+ toolMode?: AgentToolMode;
62
+ /** Extra tags stored on the task (e.g. 'scheduled'). */
63
+ tags?: string[];
64
+ /**
65
+ * Mid-run steering hook (the TUI's `/btw`). Called once between loop
66
+ * iterations; returns any text the user injected since the last drain (and
67
+ * should clear that queue). The notes are surfaced to the model as extra
68
+ * guidance on the next turn so a running task adapts without cancelling.
69
+ */
70
+ steering?: () => string[];
71
+ /** Unattended run (scheduled tasks): applies [agent.unattended] approval
72
+ * overrides; with no approvalHandler present, 'ask' degrades to deny. */
73
+ unattended?: boolean;
74
+ }
75
+ /** The slice of PriestEngine the agent loop needs. */
76
+ export interface AgentEngine {
77
+ run(request: PriestRequest, options?: {
78
+ signal?: AbortSignal;
79
+ }): Promise<PriestResponse>;
80
+ }
81
+ export interface AgentEngineContext {
82
+ engine: AgentEngine;
83
+ config: PriestConfig;
84
+ }
85
+ export interface AgentRunnerDeps {
86
+ taskStore: TaskStore;
87
+ registry: ToolRegistry;
88
+ agentConfig: MarifoldAgentConfig;
89
+ resolveSettings: (request: Pick<MarifoldRunRequest, 'profile' | 'provider' | 'model'>) => MarifoldResolvedSettings;
90
+ prepareEngine: (settings: MarifoldResolvedSettings) => Promise<AgentEngineContext>;
91
+ /** Normalize and optimize image inputs before the first provider request. */
92
+ prepareImages?: (images: ImageInput[], optimize: boolean) => Promise<ImageInput[]>;
93
+ /** Persist one clean conversation turn (objective → terminal outcome) to
94
+ * the session, so resuming shows the result without the raw agent framing. */
95
+ persistTurn?: (sessionId: string, profile: string, userText: string, assistantText: string, images?: ImageInput[], replaceUserTurnIndex?: number, responseMetrics?: ResponseMetrics) => Promise<void>;
96
+ /** Load the session's clean turns (objective → answer pairs) for bounded
97
+ * cross-objective memory on NON-lean runs. Lean/skill runs stay stateless. */
98
+ loadRecentTurns?: (sessionId: string, beforeUserTurnIndex?: number) => HistoryTurn[];
99
+ /** Lazily attach app-owned instructions selected from the objective (for
100
+ * example the built-in skill-manager guide). */
101
+ resolveBuiltInInstructions?: (objective: string, profile: string) => string[];
102
+ /** Narrow app-owned folders that the resolved profile may inspect read-only
103
+ * during a run, such as profile and global skill directories. */
104
+ resolveReadOnlyFolders?: (profile: string) => string[];
105
+ }
106
+ /**
107
+ * Approval-aware agent loop. Optionally plans, iterates tool calls against the
108
+ * ToolRegistry, and records the final outcome in the ephemeral TaskStore.
109
+ * Observable checks run through ordinary tools inside the loop; there is no
110
+ * separate model self-grading phase. Task state is never promoted into profile
111
+ * memory, and the chat memory pipeline is bypassed entirely: hidden memory
112
+ * control blocks in model output are stripped and their payloads discarded.
113
+ *
114
+ * Events are delivered as an AsyncGenerator so renderers get backpressure and
115
+ * cancellation for free. v0.11 emits one text event per model turn; a future
116
+ * upgrade to SDK streamEvents can add live deltas without changing the event
117
+ * contract.
118
+ */
119
+ export declare class AgentRunner {
120
+ private readonly deps;
121
+ constructor(deps: AgentRunnerDeps);
122
+ run(options: AgentRunOptions): AsyncGenerator<AgentEvent, void, unknown>;
123
+ private executeCall;
124
+ private requestUserInput;
125
+ private resolveApproval;
126
+ /**
127
+ * Opt-in diagnostic trace for agent-mode context cost (off by default).
128
+ * Set `MARIFOLD_AGENT_TRACE=1` to append JSONL to ~/.marifold/agent-trace.jsonl,
129
+ * or `MARIFOLD_AGENT_TRACE=<path>` for a custom file. Captures per-iteration
130
+ * input tokens + cumulative loop-context size and per-tool-result sizes, so we
131
+ * can see whether huge results or many small steps drive the growth. Never
132
+ * throws — tracing must not affect a run.
133
+ */
134
+ private trace;
135
+ private recordToolResult;
136
+ /** Drain any `/btw` steering the caller queued and record it for the next
137
+ * turn. Returns the drained notes so the run generator can surface each as a
138
+ * `steering` event to attached clients. */
139
+ private drainSteering;
140
+ private loopRequest;
141
+ private agentContext;
142
+ private extractTurn;
143
+ private shouldFallBackToControlBlocks;
144
+ private buildPlan;
145
+ private completePlanSteps;
146
+ private finish;
147
+ private assertNotAborted;
148
+ }
149
+ //# sourceMappingURL=AgentRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentRunner.d.ts","sourceRoot":"","sources":["../../src/agent/AgentRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,cAAc,EAIf,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAuB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAyB,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtE,OA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