@getcliqio/cliq-sdk 0.0.0-stage → 1.15.32

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 (338) hide show
  1. package/README.md +28 -2
  2. package/dist/agent_api.d.ts +39 -0
  3. package/dist/agent_api.d.ts.map +1 -0
  4. package/dist/agent_api.js +105 -0
  5. package/dist/agent_api.js.map +1 -0
  6. package/dist/agent_manifest.d.ts +162 -0
  7. package/dist/agent_manifest.d.ts.map +1 -0
  8. package/dist/agent_manifest.js +242 -0
  9. package/dist/agent_manifest.js.map +1 -0
  10. package/dist/agent_payloads.d.ts +103 -0
  11. package/dist/agent_payloads.d.ts.map +1 -0
  12. package/dist/agent_payloads.js +56 -0
  13. package/dist/agent_payloads.js.map +1 -0
  14. package/dist/agents/base_agent.d.ts +113 -0
  15. package/dist/agents/base_agent.d.ts.map +1 -0
  16. package/dist/agents/base_agent.js +413 -0
  17. package/dist/agents/base_agent.js.map +1 -0
  18. package/dist/agents/cli_agent.d.ts +98 -0
  19. package/dist/agents/cli_agent.d.ts.map +1 -0
  20. package/dist/agents/cli_agent.js +303 -0
  21. package/dist/agents/cli_agent.js.map +1 -0
  22. package/dist/agents/cli_rehydrate.d.ts +29 -0
  23. package/dist/agents/cli_rehydrate.d.ts.map +1 -0
  24. package/dist/agents/cli_rehydrate.js +32 -0
  25. package/dist/agents/cli_rehydrate.js.map +1 -0
  26. package/dist/agents/connector_agent.d.ts +20 -0
  27. package/dist/agents/connector_agent.d.ts.map +1 -0
  28. package/dist/agents/connector_agent.js +110 -0
  29. package/dist/agents/connector_agent.js.map +1 -0
  30. package/dist/agents/event_artifacts.d.ts +33 -0
  31. package/dist/agents/event_artifacts.d.ts.map +1 -0
  32. package/dist/agents/event_artifacts.js +73 -0
  33. package/dist/agents/event_artifacts.js.map +1 -0
  34. package/dist/agents/gate_agent.d.ts +40 -0
  35. package/dist/agents/gate_agent.d.ts.map +1 -0
  36. package/dist/agents/gate_agent.js +121 -0
  37. package/dist/agents/gate_agent.js.map +1 -0
  38. package/dist/agents/index.d.ts +32 -0
  39. package/dist/agents/index.d.ts.map +1 -0
  40. package/dist/agents/index.js +26 -0
  41. package/dist/agents/index.js.map +1 -0
  42. package/dist/agents/llm_agent.d.ts +109 -0
  43. package/dist/agents/llm_agent.d.ts.map +1 -0
  44. package/dist/agents/llm_agent.js +285 -0
  45. package/dist/agents/llm_agent.js.map +1 -0
  46. package/dist/agents/llm_contract.d.ts +7 -0
  47. package/dist/agents/llm_contract.d.ts.map +1 -0
  48. package/dist/agents/llm_contract.js +7 -0
  49. package/dist/agents/llm_contract.js.map +1 -0
  50. package/dist/agents/standard_agent.d.ts +15 -0
  51. package/dist/agents/standard_agent.d.ts.map +1 -0
  52. package/dist/agents/standard_agent.js +34 -0
  53. package/dist/agents/standard_agent.js.map +1 -0
  54. package/dist/agents/turn_result.d.ts +67 -0
  55. package/dist/agents/turn_result.d.ts.map +1 -0
  56. package/dist/agents/turn_result.js +81 -0
  57. package/dist/agents/turn_result.js.map +1 -0
  58. package/dist/agents/types.d.ts +314 -0
  59. package/dist/agents/types.d.ts.map +1 -0
  60. package/dist/agents/types.js +20 -0
  61. package/dist/agents/types.js.map +1 -0
  62. package/dist/builtin_teams/hello_hug.d.ts +9 -0
  63. package/dist/builtin_teams/hello_hug.d.ts.map +1 -0
  64. package/dist/builtin_teams/hello_hug.js +68 -0
  65. package/dist/builtin_teams/hello_hug.js.map +1 -0
  66. package/dist/builtin_teams/hello_world.d.ts +8 -0
  67. package/dist/builtin_teams/hello_world.d.ts.map +1 -0
  68. package/dist/builtin_teams/hello_world.js +65 -0
  69. package/dist/builtin_teams/hello_world.js.map +1 -0
  70. package/dist/builtin_teams/hug_example.d.ts +10 -0
  71. package/dist/builtin_teams/hug_example.d.ts.map +1 -0
  72. package/dist/builtin_teams/hug_example.js +94 -0
  73. package/dist/builtin_teams/hug_example.js.map +1 -0
  74. package/dist/builtin_teams/index.d.ts +12 -0
  75. package/dist/builtin_teams/index.d.ts.map +1 -0
  76. package/dist/builtin_teams/index.js +18 -0
  77. package/dist/builtin_teams/index.js.map +1 -0
  78. package/dist/builtin_teams/types.d.ts +29 -0
  79. package/dist/builtin_teams/types.d.ts.map +1 -0
  80. package/dist/builtin_teams/types.js +3 -0
  81. package/dist/builtin_teams/types.js.map +1 -0
  82. package/dist/core_api_client.d.ts +48 -0
  83. package/dist/core_api_client.d.ts.map +1 -0
  84. package/dist/core_api_client.js +132 -0
  85. package/dist/core_api_client.js.map +1 -0
  86. package/dist/daemon_wire.d.ts +122 -0
  87. package/dist/daemon_wire.d.ts.map +1 -0
  88. package/dist/daemon_wire.js +105 -0
  89. package/dist/daemon_wire.js.map +1 -0
  90. package/dist/events/catalog.d.ts +40 -0
  91. package/dist/events/catalog.d.ts.map +1 -0
  92. package/dist/events/catalog.js +76 -0
  93. package/dist/events/catalog.js.map +1 -0
  94. package/dist/http_daemon_client.d.ts +136 -0
  95. package/dist/http_daemon_client.d.ts.map +1 -0
  96. package/dist/http_daemon_client.js +192 -0
  97. package/dist/http_daemon_client.js.map +1 -0
  98. package/dist/hug/ask.d.ts +160 -0
  99. package/dist/hug/ask.d.ts.map +1 -0
  100. package/dist/hug/ask.js +318 -0
  101. package/dist/hug/ask.js.map +1 -0
  102. package/dist/hug/attach.d.ts +60 -0
  103. package/dist/hug/attach.d.ts.map +1 -0
  104. package/dist/hug/attach.js +103 -0
  105. package/dist/hug/attach.js.map +1 -0
  106. package/dist/hug/bridge/index.d.ts +16 -0
  107. package/dist/hug/bridge/index.d.ts.map +1 -0
  108. package/dist/hug/bridge/index.js +13 -0
  109. package/dist/hug/bridge/index.js.map +1 -0
  110. package/dist/hug/bridge/messages.d.ts +559 -0
  111. package/dist/hug/bridge/messages.d.ts.map +1 -0
  112. package/dist/hug/bridge/messages.js +165 -0
  113. package/dist/hug/bridge/messages.js.map +1 -0
  114. package/dist/hug/client.d.ts +70 -0
  115. package/dist/hug/client.d.ts.map +1 -0
  116. package/dist/hug/client.js +144 -0
  117. package/dist/hug/client.js.map +1 -0
  118. package/dist/hug/context.d.ts +54 -0
  119. package/dist/hug/context.d.ts.map +1 -0
  120. package/dist/hug/context.js +27 -0
  121. package/dist/hug/context.js.map +1 -0
  122. package/dist/hug/define.d.ts +116 -0
  123. package/dist/hug/define.d.ts.map +1 -0
  124. package/dist/hug/define.js +119 -0
  125. package/dist/hug/define.js.map +1 -0
  126. package/dist/hug/definitions/approval.d.ts +216 -0
  127. package/dist/hug/definitions/approval.d.ts.map +1 -0
  128. package/dist/hug/definitions/approval.js +50 -0
  129. package/dist/hug/definitions/approval.js.map +1 -0
  130. package/dist/hug/definitions/common.d.ts +122 -0
  131. package/dist/hug/definitions/common.d.ts.map +1 -0
  132. package/dist/hug/definitions/common.js +70 -0
  133. package/dist/hug/definitions/common.js.map +1 -0
  134. package/dist/hug/definitions/form.d.ts +197 -0
  135. package/dist/hug/definitions/form.d.ts.map +1 -0
  136. package/dist/hug/definitions/form.js +29 -0
  137. package/dist/hug/definitions/form.js.map +1 -0
  138. package/dist/hug/definitions/index.d.ts +10 -0
  139. package/dist/hug/definitions/index.d.ts.map +1 -0
  140. package/dist/hug/definitions/index.js +8 -0
  141. package/dist/hug/definitions/index.js.map +1 -0
  142. package/dist/hug/errors.d.ts +30 -0
  143. package/dist/hug/errors.d.ts.map +1 -0
  144. package/dist/hug/errors.js +46 -0
  145. package/dist/hug/errors.js.map +1 -0
  146. package/dist/hug/file_checks.d.ts +41 -0
  147. package/dist/hug/file_checks.d.ts.map +1 -0
  148. package/dist/hug/file_checks.js +105 -0
  149. package/dist/hug/file_checks.js.map +1 -0
  150. package/dist/hug/files.d.ts +137 -0
  151. package/dist/hug/files.d.ts.map +1 -0
  152. package/dist/hug/files.js +283 -0
  153. package/dist/hug/files.js.map +1 -0
  154. package/dist/hug/hug_bundle.d.ts +70 -0
  155. package/dist/hug/hug_bundle.d.ts.map +1 -0
  156. package/dist/hug/hug_bundle.js +299 -0
  157. package/dist/hug/hug_bundle.js.map +1 -0
  158. package/dist/hug/hug_catalog.d.ts +38 -0
  159. package/dist/hug/hug_catalog.d.ts.map +1 -0
  160. package/dist/hug/hug_catalog.js +67 -0
  161. package/dist/hug/hug_catalog.js.map +1 -0
  162. package/dist/hug/hug_definitions.d.ts +32 -0
  163. package/dist/hug/hug_definitions.d.ts.map +1 -0
  164. package/dist/hug/hug_definitions.js +74 -0
  165. package/dist/hug/hug_definitions.js.map +1 -0
  166. package/dist/hug/index.d.ts +37 -0
  167. package/dist/hug/index.d.ts.map +1 -0
  168. package/dist/hug/index.js +23 -0
  169. package/dist/hug/index.js.map +1 -0
  170. package/dist/hug/llm.d.ts +106 -0
  171. package/dist/hug/llm.d.ts.map +1 -0
  172. package/dist/hug/llm.js +250 -0
  173. package/dist/hug/llm.js.map +1 -0
  174. package/dist/hug/policies.d.ts +65 -0
  175. package/dist/hug/policies.d.ts.map +1 -0
  176. package/dist/hug/policies.js +80 -0
  177. package/dist/hug/policies.js.map +1 -0
  178. package/dist/hug/problems.d.ts +35 -0
  179. package/dist/hug/problems.d.ts.map +1 -0
  180. package/dist/hug/problems.js +53 -0
  181. package/dist/hug/problems.js.map +1 -0
  182. package/dist/hug/requested_inputs.d.ts +190 -0
  183. package/dist/hug/requested_inputs.d.ts.map +1 -0
  184. package/dist/hug/requested_inputs.js +220 -0
  185. package/dist/hug/requested_inputs.js.map +1 -0
  186. package/dist/hug/schema_for_inputs.d.ts +20 -0
  187. package/dist/hug/schema_for_inputs.d.ts.map +1 -0
  188. package/dist/hug/schema_for_inputs.js +95 -0
  189. package/dist/hug/schema_for_inputs.js.map +1 -0
  190. package/dist/hug/session.d.ts +113 -0
  191. package/dist/hug/session.d.ts.map +1 -0
  192. package/dist/hug/session.js +210 -0
  193. package/dist/hug/session.js.map +1 -0
  194. package/dist/hug/types.d.ts +141 -0
  195. package/dist/hug/types.d.ts.map +1 -0
  196. package/dist/hug/types.js +80 -0
  197. package/dist/hug/types.js.map +1 -0
  198. package/dist/index.d.ts +72 -0
  199. package/dist/index.d.ts.map +1 -0
  200. package/dist/index.js +54 -0
  201. package/dist/index.js.map +1 -0
  202. package/dist/logging.d.ts +172 -0
  203. package/dist/logging.d.ts.map +1 -0
  204. package/dist/logging.js +306 -0
  205. package/dist/logging.js.map +1 -0
  206. package/dist/mcp.d.ts +119 -0
  207. package/dist/mcp.d.ts.map +1 -0
  208. package/dist/mcp.js +259 -0
  209. package/dist/mcp.js.map +1 -0
  210. package/dist/mcp_client.d.ts +145 -0
  211. package/dist/mcp_client.d.ts.map +1 -0
  212. package/dist/mcp_client.js +374 -0
  213. package/dist/mcp_client.js.map +1 -0
  214. package/dist/paths.d.ts +20 -0
  215. package/dist/paths.d.ts.map +1 -0
  216. package/dist/paths.js +20 -0
  217. package/dist/paths.js.map +1 -0
  218. package/dist/protocol/factory.d.ts +32 -0
  219. package/dist/protocol/factory.d.ts.map +1 -0
  220. package/dist/protocol/factory.js +31 -0
  221. package/dist/protocol/factory.js.map +1 -0
  222. package/dist/protocol/framing.d.ts +35 -0
  223. package/dist/protocol/framing.d.ts.map +1 -0
  224. package/dist/protocol/framing.js +73 -0
  225. package/dist/protocol/framing.js.map +1 -0
  226. package/dist/protocol/index.d.ts +13 -0
  227. package/dist/protocol/index.d.ts.map +1 -0
  228. package/dist/protocol/index.js +13 -0
  229. package/dist/protocol/index.js.map +1 -0
  230. package/dist/protocol/types/agent.d.ts +42 -0
  231. package/dist/protocol/types/agent.d.ts.map +1 -0
  232. package/dist/protocol/types/agent.js +9 -0
  233. package/dist/protocol/types/agent.js.map +1 -0
  234. package/dist/protocol/types/cliq_core.d.ts +79 -0
  235. package/dist/protocol/types/cliq_core.d.ts.map +1 -0
  236. package/dist/protocol/types/cliq_core.js +17 -0
  237. package/dist/protocol/types/cliq_core.js.map +1 -0
  238. package/dist/protocol/types/foundations.d.ts +41 -0
  239. package/dist/protocol/types/foundations.d.ts.map +1 -0
  240. package/dist/protocol/types/foundations.js +10 -0
  241. package/dist/protocol/types/foundations.js.map +1 -0
  242. package/dist/protocol/types/index.d.ts +32 -0
  243. package/dist/protocol/types/index.d.ts.map +1 -0
  244. package/dist/protocol/types/index.js +27 -0
  245. package/dist/protocol/types/index.js.map +1 -0
  246. package/dist/protocol/types/messages.d.ts +827 -0
  247. package/dist/protocol/types/messages.d.ts.map +1 -0
  248. package/dist/protocol/types/messages.js +117 -0
  249. package/dist/protocol/types/messages.js.map +1 -0
  250. package/dist/protocol/types/pipeline.d.ts +122 -0
  251. package/dist/protocol/types/pipeline.d.ts.map +1 -0
  252. package/dist/protocol/types/pipeline.js +16 -0
  253. package/dist/protocol/types/pipeline.js.map +1 -0
  254. package/dist/protocol/types/schemas.d.ts +814 -0
  255. package/dist/protocol/types/schemas.d.ts.map +1 -0
  256. package/dist/protocol/types/schemas.js +772 -0
  257. package/dist/protocol/types/schemas.js.map +1 -0
  258. package/dist/protocol/types/team.d.ts +42 -0
  259. package/dist/protocol/types/team.d.ts.map +1 -0
  260. package/dist/protocol/types/team.js +15 -0
  261. package/dist/protocol/types/team.js.map +1 -0
  262. package/dist/protocol/types/workspace.d.ts +46 -0
  263. package/dist/protocol/types/workspace.d.ts.map +1 -0
  264. package/dist/protocol/types/workspace.js +9 -0
  265. package/dist/protocol/types/workspace.js.map +1 -0
  266. package/dist/settings_keys.d.ts +12 -0
  267. package/dist/settings_keys.d.ts.map +1 -0
  268. package/dist/settings_keys.js +35 -0
  269. package/dist/settings_keys.js.map +1 -0
  270. package/dist/tcp/client.d.ts +15 -0
  271. package/dist/tcp/client.d.ts.map +1 -0
  272. package/dist/tcp/client.js +28 -0
  273. package/dist/tcp/client.js.map +1 -0
  274. package/dist/tcp/connection.d.ts +79 -0
  275. package/dist/tcp/connection.d.ts.map +1 -0
  276. package/dist/tcp/connection.js +153 -0
  277. package/dist/tcp/connection.js.map +1 -0
  278. package/dist/tcp/index.d.ts +10 -0
  279. package/dist/tcp/index.d.ts.map +1 -0
  280. package/dist/tcp/index.js +7 -0
  281. package/dist/tcp/index.js.map +1 -0
  282. package/dist/tcp/server.d.ts +31 -0
  283. package/dist/tcp/server.d.ts.map +1 -0
  284. package/dist/tcp/server.js +54 -0
  285. package/dist/tcp/server.js.map +1 -0
  286. package/dist/team/bundle.d.ts +88 -0
  287. package/dist/team/bundle.d.ts.map +1 -0
  288. package/dist/team/bundle.js +214 -0
  289. package/dist/team/bundle.js.map +1 -0
  290. package/dist/team/identity.d.ts +31 -0
  291. package/dist/team/identity.d.ts.map +1 -0
  292. package/dist/team/identity.js +83 -0
  293. package/dist/team/identity.js.map +1 -0
  294. package/dist/team/index.d.ts +13 -0
  295. package/dist/team/index.d.ts.map +1 -0
  296. package/dist/team/index.js +8 -0
  297. package/dist/team/index.js.map +1 -0
  298. package/dist/team/lint_bundle.d.ts +16 -0
  299. package/dist/team/lint_bundle.d.ts.map +1 -0
  300. package/dist/team/lint_bundle.js +35 -0
  301. package/dist/team/lint_bundle.js.map +1 -0
  302. package/dist/team/ref.d.ts +48 -0
  303. package/dist/team/ref.d.ts.map +1 -0
  304. package/dist/team/ref.js +70 -0
  305. package/dist/team/ref.js.map +1 -0
  306. package/dist/team/roles.d.ts +22 -0
  307. package/dist/team/roles.d.ts.map +1 -0
  308. package/dist/team/roles.js +33 -0
  309. package/dist/team/roles.js.map +1 -0
  310. package/dist/team/tree.d.ts +101 -0
  311. package/dist/team/tree.d.ts.map +1 -0
  312. package/dist/team/tree.js +125 -0
  313. package/dist/team/tree.js.map +1 -0
  314. package/dist/team_lint.d.ts +57 -0
  315. package/dist/team_lint.d.ts.map +1 -0
  316. package/dist/team_lint.js +277 -0
  317. package/dist/team_lint.js.map +1 -0
  318. package/dist/telemetry/stream_json_usage.d.ts +39 -0
  319. package/dist/telemetry/stream_json_usage.d.ts.map +1 -0
  320. package/dist/telemetry/stream_json_usage.js +139 -0
  321. package/dist/telemetry/stream_json_usage.js.map +1 -0
  322. package/dist/telemetry/usage.d.ts +288 -0
  323. package/dist/telemetry/usage.d.ts.map +1 -0
  324. package/dist/telemetry/usage.js +421 -0
  325. package/dist/telemetry/usage.js.map +1 -0
  326. package/dist/utils/duration.d.ts +11 -0
  327. package/dist/utils/duration.d.ts.map +1 -0
  328. package/dist/utils/duration.js +22 -0
  329. package/dist/utils/duration.js.map +1 -0
  330. package/dist/utils/redact.d.ts +26 -0
  331. package/dist/utils/redact.d.ts.map +1 -0
  332. package/dist/utils/redact.js +52 -0
  333. package/dist/utils/redact.js.map +1 -0
  334. package/dist/utils/url.d.ts +6 -0
  335. package/dist/utils/url.d.ts.map +1 -0
  336. package/dist/utils/url.js +11 -0
  337. package/dist/utils/url.js.map +1 -0
  338. package/package.json +72 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm_agent.js","sourceRoot":"","sources":["../../src/agents/llm_agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAA2B,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAC;AAC/J,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAoB,MAAM,iBAAiB,CAAC;AAsBtE,SAAS,sBAAsB,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,SAAS,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AC;IACrB,CAAC;AACL,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The allowed ways an LLM / CLI turn may end (PLAN-hug-requests §10.5): finish the work, end with
3
+ * `QUESTION: …`, or print one `cliq_hug` fence. Defined with the rest of the model-facing Hug
4
+ * contract in `hug/llm.ts`; re-exported here for the agent loops.
5
+ */
6
+ export { CLIQ_ALLOWED_RESPONSE_INSTRUCTION, CLIQ_HUG_FENCE } from '../hug/llm.js';
7
+ //# sourceMappingURL=llm_contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm_contract.d.ts","sourceRoot":"","sources":["../../src/agents/llm_contract.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iCAAiC,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The allowed ways an LLM / CLI turn may end (PLAN-hug-requests §10.5): finish the work, end with
3
+ * `QUESTION: …`, or print one `cliq_hug` fence. Defined with the rest of the model-facing Hug
4
+ * contract in `hug/llm.ts`; re-exported here for the agent loops.
5
+ */
6
+ export { CLIQ_ALLOWED_RESPONSE_INSTRUCTION, CLIQ_HUG_FENCE } from '../hug/llm.js';
7
+ //# sourceMappingURL=llm_contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm_contract.js","sourceRoot":"","sources":["../../src/agents/llm_contract.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iCAAiC,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * StandardAgent — base class for standard (non-gate) phase agents.
3
+ *
4
+ * Extends BaseAgent by adding upstream data, upstream text rendering,
5
+ * and commands to the context.
6
+ */
7
+ import type { Invoke } from '../protocol/types/index.js';
8
+ import { BaseAgent, type EventPoster, type AgentDaemonTransport } from './base_agent.js';
9
+ import type { StandardContext, AgentOutput } from './types.js';
10
+ /** Base class for standard phase agents: the base context plus upstream data, rendered upstream text and commands. */
11
+ export declare abstract class StandardAgent extends BaseAgent {
12
+ protected build_context(invoke: Invoke, post_event: EventPoster, transport?: AgentDaemonTransport): StandardContext;
13
+ protected abstract on_invoke(ctx: StandardContext): Promise<AgentOutput | void>;
14
+ }
15
+ //# sourceMappingURL=standard_agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard_agent.d.ts","sourceRoot":"","sources":["../../src/agents/standard_agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE/D,sHAAsH;AACtH,8BAAsB,aAAc,SAAQ,SAAS;cAC9B,aAAa,CAC5B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,WAAW,EACvB,SAAS,CAAC,EAAE,oBAAoB,GACjC,eAAe;uBAYU,SAAS,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAC3F"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * StandardAgent — base class for standard (non-gate) phase agents.
3
+ *
4
+ * Extends BaseAgent by adding upstream data, upstream text rendering,
5
+ * and commands to the context.
6
+ */
7
+ import { BaseAgent } from './base_agent.js';
8
+ /** Base class for standard phase agents: the base context plus upstream data, rendered upstream text and commands. */
9
+ export class StandardAgent extends BaseAgent {
10
+ build_context(invoke, post_event, transport) {
11
+ const base = super.build_context(invoke, post_event, transport);
12
+ const upstream = invoke.upstream ?? {};
13
+ return {
14
+ ...base,
15
+ upstream,
16
+ upstream_text: render_upstream_text(upstream),
17
+ commands: invoke.commands ?? [],
18
+ ...(invoke.output_schema ? { output_schema: invoke.output_schema } : {}),
19
+ };
20
+ }
21
+ }
22
+ /**
23
+ * Render upstream phase outputs into a text block suitable for LLM
24
+ * prompts or agent consumption.
25
+ */
26
+ function render_upstream_text(upstream) {
27
+ const entries = Object.entries(upstream);
28
+ if (entries.length === 0)
29
+ return '';
30
+ return entries
31
+ .map(([phase, output]) => `--- ${phase} ---\n${output.text}`)
32
+ .join('\n\n');
33
+ }
34
+ //# sourceMappingURL=standard_agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard_agent.js","sourceRoot":"","sources":["../../src/agents/standard_agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,SAAS,EAA+C,MAAM,iBAAiB,CAAC;AAGzF,sHAAsH;AACtH,MAAM,OAAgB,aAAc,SAAQ,SAAS;IAC9B,aAAa,CAC5B,MAAc,EACd,UAAuB,EACvB,SAAgC;QAEhC,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAChE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;QACvC,OAAO;YACH,GAAG,IAAI;YACP,QAAQ;YACR,aAAa,EAAE,oBAAoB,CAAC,QAAQ,CAAC;YAC7C,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;YAC/B,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3E,CAAC;IACN,CAAC;CAGJ;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAAC,QAA4E;IACtG,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,OAAO,OAAO;SACT,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,SAAS,MAAM,CAAC,IAAI,EAAE,CAAC;SAC5D,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Closed turn outcomes for LlmAgent / CliAgent loops (Yamazaki W12).
3
+ *
4
+ * Subclasses interpret provider- or CLI-specific response shapes into one
5
+ * of these kinds. The base loop only branches on this union — the daemon
6
+ * never parses model JSON / NDJSON.
7
+ */
8
+ import { type LlmAsk } from '../hug/llm.js';
9
+ /** One chat turn appended to the conversation for the next in-process turn. */
10
+ export type ChatMessage = {
11
+ role: string;
12
+ content: string;
13
+ };
14
+ /**
15
+ * Result of one model/CLI turn after the agent processed the raw response.
16
+ *
17
+ * - continue — another in-process turn (tools / multi-step); API only
18
+ * - complete — phase output ready
19
+ * - ask — ask people (ctx.ask with the phase's defaults, yielding); the phase resumes with the answers
20
+ * - invalid_ask — the reply has a `cliq_hug` block that fails the check: nobody is asked; the model
21
+ * is told the problems and sends it again (LlmAgent), or the phase fails with them (CliAgent)
22
+ * - fail — ctx.error
23
+ */
24
+ export type TurnResult = {
25
+ kind: 'continue';
26
+ assistant_text: string;
27
+ append?: ChatMessage[];
28
+ } | {
29
+ kind: 'complete';
30
+ text: string;
31
+ } | {
32
+ kind: 'ask';
33
+ ask: LlmAsk; /** The model's text, when the ask must go back to it to be fixed. */
34
+ assistant_text?: string;
35
+ } | {
36
+ kind: 'invalid_ask';
37
+ assistant_text: string;
38
+ problems: string[];
39
+ } | {
40
+ kind: 'fail';
41
+ code: string;
42
+ message: string;
43
+ };
44
+ /** Map plain assistant text → complete, or EMPTY_RESPONSE if blank. */
45
+ export declare function turn_from_text(text: string): TurnResult;
46
+ /** What the CLI turn did besides answering (decides whether a trailing question pauses). */
47
+ export interface CliTurnFacts {
48
+ /** The turn edited / wrote files (a tool call that changes the workspace). */
49
+ readonly changed_files?: boolean;
50
+ /** `false` turns off the plain-question fallback for this phase (`pause_on_question: false`). */
51
+ readonly pause_on_question?: boolean;
52
+ }
53
+ /**
54
+ * The question the agent is asking, or null:
55
+ *
56
+ * 1. a `QUESTION: …` line (the contract the prompt asks for) — always;
57
+ * 2. otherwise, when the turn changed no files and the fallback is on, a
58
+ * final paragraph that ends with "?" — the agent stopped to ask, not
59
+ * "done — anything else?" after real work.
60
+ */
61
+ export declare function extract_question(text: string, facts?: CliTurnFacts): string | null;
62
+ /**
63
+ * Map CLI stdout → an ask (a `cliq_hug` fence, or the agent ending with a question) or
64
+ * complete/fail (text). The fence wins over surrounding narrative.
65
+ */
66
+ export declare function turn_from_cli_stdout(stdout: string, facts?: CliTurnFacts): TurnResult;
67
+ //# sourceMappingURL=turn_result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turn_result.d.ts","sourceRoot":"","sources":["../../src/agents/turn_result.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAgC,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1E,+EAA+E;AAC/E,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,CAAC,qEAAqE;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3H;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAUvD;AAED,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,iGAAiG;IACjG,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,YAAiB,GAAG,MAAM,GAAG,IAAI,CAYtF;AAwBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,YAAiB,GAAG,UAAU,CAOzF"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Closed turn outcomes for LlmAgent / CliAgent loops (Yamazaki W12).
3
+ *
4
+ * Subclasses interpret provider- or CLI-specific response shapes into one
5
+ * of these kinds. The base loop only branches on this union — the daemon
6
+ * never parses model JSON / NDJSON.
7
+ */
8
+ import { parse_cliq_hug, question_hug } from '../hug/llm.js';
9
+ /** Map plain assistant text → complete, or EMPTY_RESPONSE if blank. */
10
+ export function turn_from_text(text) {
11
+ const trimmed = (text ?? '').trim();
12
+ if (!trimmed) {
13
+ return {
14
+ kind: 'fail',
15
+ code: 'EMPTY_RESPONSE',
16
+ message: 'Model returned an empty response',
17
+ };
18
+ }
19
+ return { kind: 'complete', text: trimmed };
20
+ }
21
+ /**
22
+ * The question the agent is asking, or null:
23
+ *
24
+ * 1. a `QUESTION: …` line (the contract the prompt asks for) — always;
25
+ * 2. otherwise, when the turn changed no files and the fallback is on, a
26
+ * final paragraph that ends with "?" — the agent stopped to ask, not
27
+ * "done — anything else?" after real work.
28
+ */
29
+ export function extract_question(text, facts = {}) {
30
+ // Agents on Windows (or piping through one) end lines with CRLF; a stray \r must not hide the QUESTION line.
31
+ text = (text ?? '').replace(/\r\n?/g, '\n');
32
+ const lines = text.trim().split('\n');
33
+ for (let i = lines.length - 1; i >= Math.max(0, lines.length - 12); i--) {
34
+ const question = question_line_text(lines[i]);
35
+ if (question !== null)
36
+ return [question, ...lines.slice(i + 1)].join('\n').trim();
37
+ }
38
+ if (facts.changed_files || facts.pause_on_question === false)
39
+ return null;
40
+ const paragraphs = text.trim().split(/\n\s*\n/).filter((p) => p.trim() && !p.trim().startsWith('```'));
41
+ const last = paragraphs[paragraphs.length - 1]?.trim() ?? '';
42
+ return ends_with_question(last) ? last : null;
43
+ }
44
+ /**
45
+ * Text after `QUESTION:` on a line (markdown `*` / `_` around the label and
46
+ * leading `*`, `_` and spaces before the text are skipped), or null when the
47
+ * line is not a question line.
48
+ */
49
+ function question_line_text(line) {
50
+ const label = /^\s*[*_]*QUESTION[*_]*\s*:/i.exec(line);
51
+ if (!label)
52
+ return null;
53
+ const after = line.slice(label[0].length);
54
+ // Same result as the old `:[*_]*\s*(.+)$`: when only markup follows, its last char is the
55
+ // text; nothing (or a line break in the text) means this is not a question line.
56
+ const text = after.replace(/^[*_]*\s*/, '') || after.slice(-1);
57
+ return text && !/[\n\r\u2028\u2029]/.test(text) ? text : null;
58
+ }
59
+ /** True when `text` ends with "?" once trailing markdown (`*`, `_`, backticks) and whitespace are ignored. */
60
+ function ends_with_question(text) {
61
+ let end = text.length;
62
+ while (end > 0 && /[*_`\s]/.test(text[end - 1]))
63
+ end--;
64
+ return text[end - 1] === '?';
65
+ }
66
+ /**
67
+ * Map CLI stdout → an ask (a `cliq_hug` fence, or the agent ending with a question) or
68
+ * complete/fail (text). The fence wins over surrounding narrative.
69
+ */
70
+ export function turn_from_cli_stdout(stdout, facts = {}) {
71
+ const hug = parse_cliq_hug(stdout);
72
+ if (hug.kind === 'ask')
73
+ return { kind: 'ask', ask: hug.ask, assistant_text: stdout };
74
+ if (hug.kind === 'invalid')
75
+ return { kind: 'invalid_ask', assistant_text: stdout, problems: hug.problems };
76
+ const question = extract_question(stdout, facts);
77
+ if (question)
78
+ return { kind: 'ask', ask: question_hug(question, stdout) };
79
+ return turn_from_text(stdout);
80
+ }
81
+ //# sourceMappingURL=turn_result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turn_result.js","sourceRoot":"","sources":["../../src/agents/turn_result.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAe,MAAM,eAAe,CAAC;AAyB1E,uEAAuE;AACvE,MAAM,UAAU,cAAc,CAAC,IAAY;IAC1C,MAAM,OAAO,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO;YACN,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,kCAAkC;SAC3C,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC5C,CAAC;AAUD;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,QAAsB,EAAE;IACtE,6GAA6G;IAC7G,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzE,MAAM,QAAQ,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;QAC/C,IAAI,QAAQ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AAC,IAAI,CAAC;AAC/D,CAAC;AAED,8GAA8G;AAC9G,SAAS,kBAAkB,CAAC,IAAY;IACvC,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IACtB,OAAO,GAAG,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAE,CAAC;QAAE,GAAG,EAAE,CAAC;IACxD,OAAO,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,QAAsB,EAAE;IAC5E,MAAM,GAAG,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,GAAG,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;IACrF,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC3G,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,QAAQ;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1E,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Agent context types — the layered context hierarchy for the TCP
3
+ * agent protocol.
4
+ *
5
+ * Each layer adds domain-specific fields to the context. The base
6
+ * protocol is network-pure — no filesystem paths. Only agents that
7
+ * genuinely operate on the local filesystem (CLI agents, exec) get
8
+ * filesystem paths at their layer.
9
+ *
10
+ * Hierarchy:
11
+ *
12
+ * BaseContext
13
+ * ├── StandardContext (+upstream, +commands)
14
+ * │ ├── LlmContext (+model, +prompt, +api_key, +project_dir)
15
+ * │ │ ├── CliContext (+binary, +args)
16
+ * │ │ └── GateContext (+check_results, +route_targets, +verdict helpers)
17
+ * │ └── ConnectorContext (+action, +sources, +targets)
18
+ */
19
+ import type { Ref, Output, OutputSchema } from '../protocol/types/index.js';
20
+ import type { Ask, HugApi, ResumedOutcome } from '../hug/ask.js';
21
+ import type { AttachFileSpec } from '../hug/attach.js';
22
+ import type { Attachment } from '../hug/types.js';
23
+ import type { HugSession } from '../hug/session.js';
24
+ import type { Readable } from 'node:stream';
25
+ import type { HugFileEntry, HugFileSelector, SavedHugFile } from '../hug/files.js';
26
+ import type { FileValue } from '../hug/requested_inputs.js';
27
+ /** Opaque agent cursor persisted across a wait and its resume. */
28
+ export interface AgentCheckpoint {
29
+ version: number;
30
+ agent_data?: unknown;
31
+ }
32
+ /**
33
+ * Typed event taxonomy for agent-to-orchestrator streaming communication.
34
+ *
35
+ * - progress / thinking / assistant_message / tool_call / tool_result — intermediate
36
+ * - gate_verdict — gate outcome (captured by orchestrator for routing)
37
+ * - warning — non-fatal issue (agent keeps running)
38
+ * - log — structured log line
39
+ */
40
+ export type AgentEventType = 'progress' | 'thinking' | 'assistant_message' | 'tool_call' | 'tool_result' | 'gate_verdict' | 'warning' | 'log';
41
+ /** One typed event an agent emitted via `ctx.emit()`. */
42
+ export interface AgentEvent {
43
+ type: AgentEventType;
44
+ payload: Record<string, unknown>;
45
+ /** Emit time, ms since epoch. */
46
+ ts: number;
47
+ }
48
+ /**
49
+ * Minimal context every agent gets from every invoke.
50
+ *
51
+ * No filesystem paths — the base contract is pure data-in, data-out
52
+ * over TCP. The orchestrator sends role/requirement content pre-resolved;
53
+ * agents never read files for protocol data.
54
+ *
55
+ * `inputs` / messages / checkpoint are rehydrated by the daemon before
56
+ * invoke — authors do not re-merge prior state. A phase that waited on Hugs
57
+ * comes back with `resumed_outcome` (PLAN-hug-requests §10.4).
58
+ */
59
+ export interface BaseContext {
60
+ readonly agent: Ref;
61
+ readonly phase: Ref;
62
+ readonly phase_type: 'STANDARD' | 'GATE' | 'NOTIFY';
63
+ readonly role: string;
64
+ readonly requirement: string;
65
+ /** Opaque team-authored config from the YAML `payload:` block. */
66
+ readonly config: Record<string, unknown>;
67
+ /** Operator-provided settings from `settings.agents.<name>`. */
68
+ readonly settings: Record<string, unknown>;
69
+ /** Run inputs (merged with team defaults by the daemon). */
70
+ readonly inputs: Record<string, unknown>;
71
+ /**
72
+ * Conversation / transcript turns for multi-turn agents (rehydrated
73
+ * from the durable phase transcript when present).
74
+ */
75
+ readonly messages: ReadonlyArray<{
76
+ role: string;
77
+ content: string;
78
+ }>;
79
+ /** Opaque cursor from before a wait; null on a fresh phase start. */
80
+ readonly checkpoint: AgentCheckpoint | null;
81
+ /**
82
+ * On a resume after a wait on Hugs: how each resumed Hug ended up once its stored policy
83
+ * re-ran (`result` null for a policy with functions — the agent's `ctx.ask` re-runs it). Null
84
+ * on a fresh start.
85
+ */
86
+ resumed_outcome: readonly ResumedOutcome[] | null;
87
+ /**
88
+ * Custom event types this team declares (from manifest `events:` array).
89
+ * Agents may emit any of these via `emit_event()`.
90
+ */
91
+ readonly manifest_events: readonly string[];
92
+ /** Emit a typed intermediate event to the orchestrator. Agent keeps running. */
93
+ emit: (type: AgentEventType, payload: Record<string, unknown>) => void;
94
+ /** Send an intermediate progress update. Sugar over emit('progress', ...). */
95
+ progress: (message: string, percent?: number, metadata?: Record<string, unknown>) => void;
96
+ /** Signal successful completion with output. Lifecycle terminator — ends agent. */
97
+ complete: (output: Output) => void;
98
+ /** Signal fatal failure. Lifecycle terminator — ends agent. */
99
+ error: (code: string, message: string) => void;
100
+ /** Hugs at the low level: open one and read its events, or the sessions restored on resume. */
101
+ readonly hug: HugApi;
102
+ /**
103
+ * Ask people with a hug (PLAN-hug-widgets §9.1): `ctx.ask(review_batch, { title, params, … })` with its imported
104
+ * definition (typed), `ctx.ask('review-batch', …)` by name, or `ctx.ask({ title, params })` with the phase's hug
105
+ * (else `form`). The params are checked against the hug's definition before the Hug opens; every response is
106
+ * checked before the policy (default: the first valid response) sees it. Returns the checked answer — or throws
107
+ * `HugExpiredError` / `HugCancelledError` / `HugRejectedError`. Channels, expiry and reminders default to the
108
+ * phase's `hug:` block. With `wait: 'yield'` the process ends while people answer and the phase resumes later.
109
+ */
110
+ ask: Ask;
111
+ /**
112
+ * Upload workspace files (paths or globs) as run artifacts and return them as a Hug's `attachments` — the files
113
+ * its frontend may read. Files that can't be attached (no match, too large, outside the workspace) are logged
114
+ * and left out.
115
+ */
116
+ attach: (files: readonly (string | AttachFileSpec)[]) => Promise<Attachment[]>;
117
+ /**
118
+ * Lifecycle terminator: yield while these Hugs are open. Saves each session's state (`state`
119
+ * is stored as the agent's own) and posts `phase.waiting`; the process ends and cliqd
120
+ * re-invokes the phase with `resume.hugs` when one of them has events.
121
+ */
122
+ wait: (opts: {
123
+ sessions: HugSession[];
124
+ state?: unknown;
125
+ }) => Promise<void>;
126
+ /**
127
+ * Files people sent in this run's Hugs (PLAN-hug-requests Step 11): references to them, picked by
128
+ * phase and input — by default the latest round's current files from everyone, oldest answer
129
+ * first. Read from the catalog cliqd writes when the phase starts (`$CLIQ_RUN_DIR/hug-files.json`),
130
+ * so it covers every finished upstream phase; files from this agent's own `ask` arrive in its
131
+ * answers.
132
+ */
133
+ hug_files: (selector: HugFileSelector) => HugFileEntry[];
134
+ /**
135
+ * Read a file someone sent (a reference from `hug_files` or an answer) through cliqd, wherever it
136
+ * is stored. Without `dest`, its bytes as a stream; with `dest` (a path in the workspace), saved
137
+ * there after its size and sha256 are checked. Retries while cliqd or CliqHub can't be reached,
138
+ * for up to 2 minutes.
139
+ */
140
+ download: {
141
+ (ref: FileValue): Promise<Readable>;
142
+ (ref: FileValue, dest: string): Promise<SavedHugFile>;
143
+ };
144
+ /**
145
+ * Upload a durable artifact to Hub storage (cliqd streams it to CliqHub).
146
+ *
147
+ * Stored artifacts survive workspace destruction. Returns `{ artifact_id, download_url }`:
148
+ * `download_url` is a CliqHub URL that needs a CliqHub login to open (a person, or cliqd) —
149
+ * agents read the bytes with `get_artifact`.
150
+ */
151
+ submit_artifact: (spec: {
152
+ name: string;
153
+ content: string;
154
+ mime_type?: string;
155
+ description?: string;
156
+ encoding?: 'utf8' | 'base64';
157
+ }) => Promise<{
158
+ artifact_id: string;
159
+ download_url: string;
160
+ }>;
161
+ /**
162
+ * Download a stored artifact into the workspace.
163
+ *
164
+ * Accepts a `cliq://artifacts/<id>` URI, reads the metadata and the bytes through cliqd
165
+ * (`/v1/artifacts/download` — cliqd fetches them with its own CliqHub token), and writes the
166
+ * file to `.cliq/artifacts/<name>` in the workspace.
167
+ *
168
+ * Returns local path and artifact metadata.
169
+ */
170
+ get_artifact: (uri: string) => Promise<{
171
+ path: string;
172
+ artifact_id: string;
173
+ name: string;
174
+ mime_type: string;
175
+ size_bytes: number;
176
+ }>;
177
+ /**
178
+ * Emit a custom event to the Hub notification pipeline.
179
+ * Event type must be `custom.*` prefixed.
180
+ */
181
+ emit_event: (event_type: string, message: string) => void;
182
+ /**
183
+ * Structured logging into the run log (Hub `#logs` when mirrored).
184
+ *
185
+ * Convention:
186
+ * - `info` — user-visible milestones (phase work started, decision taken)
187
+ * - `warn` — degraded but continued
188
+ * - `error` — handled failure the user should see in the run trail
189
+ * - `debug` — high-volume internals (avoid in normal agents)
190
+ *
191
+ * Do not dump secrets or full LLM streams. Prefer `ctx.error` for
192
+ * fatal phase failure. Process start/crash fatals use SDK `get_logger`
193
+ * (daemon ops), not `console.error` alone.
194
+ */
195
+ log: AgentLogger;
196
+ }
197
+ /** Run-trail logger on the context (`ctx.log`): each call posts a `log` agent event with `data` merged in. */
198
+ export interface AgentLogger {
199
+ info: (message: string, data?: Record<string, unknown>) => void;
200
+ warn: (message: string, data?: Record<string, unknown>) => void;
201
+ error: (message: string, data?: Record<string, unknown>) => void;
202
+ debug: (message: string, data?: Record<string, unknown>) => void;
203
+ }
204
+ /**
205
+ * Context for standard phase agents.
206
+ *
207
+ * Adds upstream data (output from completed upstream phases) and
208
+ * commands (for exec-like phases). Still no filesystem paths.
209
+ */
210
+ export interface StandardContext extends BaseContext {
211
+ /** Output from completed upstream phases, keyed by phase name. */
212
+ readonly upstream: Record<string, Output>;
213
+ /** Pre-rendered text summary of all upstream outputs. */
214
+ readonly upstream_text: string;
215
+ /** Shell commands declared on this phase (for exec-like agents). */
216
+ readonly commands: Command[];
217
+ /** Declared output schema for this phase — describes expected output structure. */
218
+ readonly output_schema?: OutputSchema;
219
+ }
220
+ /**
221
+ * Context for LLM API agents (gemini-api, claude-api, openai-api).
222
+ *
223
+ * Adds model config and an assembled prompt. `project_dir` is the workspace, always (files people
224
+ * send in Hugs are saved under it, in `.cliq/hugs/`); `workspace_dir` is the workspace too, but only
225
+ * when the phase gives the model the whole of it (`workspace_access`).
226
+ */
227
+ export interface LlmContext extends StandardContext {
228
+ readonly model: string;
229
+ readonly api_key: string;
230
+ readonly prompt: string;
231
+ readonly temperature?: number;
232
+ readonly max_turns?: number;
233
+ /** The workspace (cliqd's `project_dir`). */
234
+ readonly project_dir: string;
235
+ /** The workspace, when `workspace_access` (or its old name `needs_filesystem`) is on. */
236
+ readonly workspace_dir?: string;
237
+ }
238
+ /**
239
+ * Context for gate phase agents.
240
+ *
241
+ * Extends LlmContext — gate phases use LLM capabilities to evaluate
242
+ * upstream output and render a verdict. The agent calls exactly one
243
+ * of pass/route/escalate; each takes optional `data` rows for the phase output.
244
+ */
245
+ export interface GateContext extends LlmContext {
246
+ readonly check_results: string[];
247
+ readonly route_targets: string[];
248
+ readonly iteration: number;
249
+ readonly max_iterations: number;
250
+ /** Verdict: all checks pass, pipeline continues. */
251
+ pass: (comment: string, data?: Array<Record<string, unknown>>) => void;
252
+ /** Verdict: send back to a specific phase for rework. */
253
+ route: (target: string, comment: string, data?: Array<Record<string, unknown>>) => void;
254
+ /** Verdict: requires human intervention. */
255
+ escalate: (comment: string, data?: Array<Record<string, unknown>>) => void;
256
+ }
257
+ /**
258
+ * Context for CLI wrapper agents (cursor, claude-code, codex).
259
+ *
260
+ * Extends LlmContext with the binary to spawn; it runs in `project_dir` (the workspace) and always
261
+ * has the whole of it — `workspace_access` doesn't apply.
262
+ */
263
+ export interface CliContext extends LlmContext {
264
+ readonly binary: string;
265
+ readonly args: readonly string[];
266
+ readonly env_vars: Readonly<Record<string, string>>;
267
+ }
268
+ /** A data source to fetch from an external system. */
269
+ export interface Source {
270
+ readonly ref: string;
271
+ readonly name: string;
272
+ /** Any other field from the phase entry (url, headers, method, body …). */
273
+ readonly [field: string]: unknown;
274
+ }
275
+ /** A data target to deliver to an external system. */
276
+ export interface Target {
277
+ readonly ref: string;
278
+ readonly name: string;
279
+ readonly file?: string;
280
+ /** Any other field from the phase entry (url, headers, method, title, mode …). */
281
+ readonly [field: string]: unknown;
282
+ }
283
+ /**
284
+ * Context for connector agents (jira, zendesk, gdrive, s3, etc.).
285
+ *
286
+ * No filesystem paths — connectors talk to external APIs. They receive
287
+ * data via upstream and return data via complete.
288
+ */
289
+ export interface ConnectorContext extends StandardContext {
290
+ readonly action: string;
291
+ readonly sources: readonly Source[];
292
+ readonly targets: readonly Target[];
293
+ /** Alias for settings — semantic clarity for connector authors. */
294
+ readonly credentials: Readonly<Record<string, unknown>>;
295
+ /**
296
+ * Record one external API call the connector just made. The
297
+ * ConnectorAgent base auto-reports a usage record on completion
298
+ * with `unit_kind: 'calls'`, `units_in` = total requests,
299
+ * `units_out` = successful requests, `external_calls` = total.
300
+ * Non-fatal to omit — the daemon still emits a baseline record.
301
+ */
302
+ record_call: (ok: boolean) => void;
303
+ }
304
+ /** What an agent's on_invoke returns (auto-sent as `complete`). */
305
+ export type AgentOutput = Output;
306
+ /** Command shape (matches the Invoke schema's Command). */
307
+ export interface Command {
308
+ readonly id?: string;
309
+ readonly name?: string;
310
+ readonly run: string;
311
+ /** false: a failure is logged and the next command runs. Unset or true (default): the phase fails. */
312
+ readonly escalate_on_fail?: boolean;
313
+ }
314
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAOD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACpB,UAAU,GACV,UAAU,GACV,mBAAmB,GACnB,WAAW,GACX,aAAa,GACb,cAAc,GACd,SAAS,GACT,KAAK,CAAC;AAEZ,yDAAyD;AACzD,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;CACd;AAOD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,KAAK,EAAE,GAA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AC;CACvC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Agent context types — the layered context hierarchy for the TCP
3
+ * agent protocol.
4
+ *
5
+ * Each layer adds domain-specific fields to the context. The base
6
+ * protocol is network-pure — no filesystem paths. Only agents that
7
+ * genuinely operate on the local filesystem (CLI agents, exec) get
8
+ * filesystem paths at their layer.
9
+ *
10
+ * Hierarchy:
11
+ *
12
+ * BaseContext
13
+ * ├── StandardContext (+upstream, +commands)
14
+ * │ ├── LlmContext (+model, +prompt, +api_key, +project_dir)
15
+ * │ │ ├── CliContext (+binary, +args)
16
+ * │ │ └── GateContext (+check_results, +route_targets, +verdict helpers)
17
+ * │ └── ConnectorContext (+action, +sources, +targets)
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `@cliq/hello-hug` — writes a greeting to `greeting.txt`, then asks a reviewer through a Hug with the file
3
+ * attached and two questions (tone, rating). Runs anywhere: exec phases and the Hug gate, no API keys.
4
+ * (Elan's Hug example, PLAN-team-bundle P19 — it was only in `cliq/examples/hello-hug`.)
5
+ */
6
+ import type { BuiltinSource } from './types.js';
7
+ /** `@cliq/hello-hug`. */
8
+ export declare const HELLO_HUG: BuiltinSource;
9
+ //# sourceMappingURL=hello_hug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hello_hug.d.ts","sourceRoot":"","sources":["../../src/builtin_teams/hello_hug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,yBAAyB;AACzB,eAAO,MAAM,SAAS,EAAE,aA4DvB,CAAC"}