@turri-dev/cli 0.4.3-next.a60ada5 → 0.4.3-next.fd01774

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 (530) hide show
  1. package/README.md +23 -3
  2. package/dist/banner.js +248 -0
  3. package/dist/capture-cli.js +4 -4
  4. package/dist/capture-view.js +99 -0
  5. package/dist/chat-commands.js +6 -6
  6. package/dist/chat-models.js +17 -15
  7. package/dist/chat-tab-header.js +21 -9
  8. package/dist/chat-tabs.js +1 -1
  9. package/dist/chat-terminal.js +127 -67
  10. package/dist/chat-waiting.js +0 -20
  11. package/dist/cli-options.js +11 -7
  12. package/dist/cli-root.js +101 -0
  13. package/dist/cli.js +20 -26
  14. package/dist/conform-cli.js +4 -6
  15. package/dist/cultivate-cli.js +65 -97
  16. package/dist/doctor-cli.js +99 -0
  17. package/dist/drift-cli.js +2 -7
  18. package/dist/entry-renderers.js +107 -0
  19. package/dist/extension.js +14 -3355
  20. package/dist/init-config-cli.js +209 -0
  21. package/dist/launch-cli.js +55 -91
  22. package/dist/lineage-cli.js +2 -4
  23. package/dist/loop-cli.js +118 -237
  24. package/dist/panel-view.js +409 -0
  25. package/dist/parse-cli.js +5 -2
  26. package/dist/pi-launch.js +41 -13
  27. package/dist/pi-themes.js +2 -2
  28. package/dist/plain-code-blocks.js +1 -1
  29. package/dist/print-mode.js +20 -0
  30. package/dist/question-dialog.js +10 -6
  31. package/dist/quiet.js +7 -106
  32. package/dist/regenerate/diff-view.js +6 -87
  33. package/dist/regenerate/jobs-tree.js +2 -17
  34. package/dist/regenerate/spec-map-view.js +3 -68
  35. package/dist/regenerate-cli.js +7 -11
  36. package/dist/reopen.js +40 -7
  37. package/dist/skill-progress.js +25 -0
  38. package/dist/skill-report.js +52 -0
  39. package/dist/terminal-marks.js +21 -0
  40. package/dist/terminal-notifications.js +116 -31
  41. package/dist/terminal-view.js +275 -0
  42. package/dist/turri-versions.js +64 -6
  43. package/docs/README.md +2 -2
  44. package/docs/capture.md +47 -11
  45. package/docs/chats.md +7 -5
  46. package/docs/claude-subscription.md +1 -1
  47. package/docs/config.md +10 -7
  48. package/docs/development.md +30 -64
  49. package/docs/headless.md +3 -1
  50. package/docs/hosting.md +3 -251
  51. package/docs/installation.md +5 -3
  52. package/docs/launch.md +1 -1
  53. package/docs/sandbox.md +2 -0
  54. package/docs/sentinel.md +4 -4
  55. package/docs/using.md +3 -3
  56. package/package.json +13 -31
  57. package/dist/ask.d.ts +0 -90
  58. package/dist/ask.js +0 -170
  59. package/dist/background-skills.d.ts +0 -56
  60. package/dist/background-skills.js +0 -129
  61. package/dist/bedrock-region.d.ts +0 -66
  62. package/dist/bedrock-region.js +0 -144
  63. package/dist/brand.d.ts +0 -13
  64. package/dist/btw.d.ts +0 -69
  65. package/dist/btw.js +0 -174
  66. package/dist/capture/agents.d.ts +0 -361
  67. package/dist/capture/agents.js +0 -332
  68. package/dist/capture/area.d.ts +0 -58
  69. package/dist/capture/area.js +0 -197
  70. package/dist/capture/assemble.d.ts +0 -122
  71. package/dist/capture/assemble.js +0 -452
  72. package/dist/capture/capture.d.ts +0 -116
  73. package/dist/capture/capture.js +0 -1228
  74. package/dist/capture/chat.d.ts +0 -29
  75. package/dist/capture/chat.js +0 -94
  76. package/dist/capture/checks.d.ts +0 -142
  77. package/dist/capture/checks.js +0 -643
  78. package/dist/capture/config.d.ts +0 -13
  79. package/dist/capture/config.js +0 -60
  80. package/dist/capture/interface.d.ts +0 -71
  81. package/dist/capture/interface.js +0 -199
  82. package/dist/capture/map.d.ts +0 -56
  83. package/dist/capture/map.js +0 -530
  84. package/dist/capture/progress.d.ts +0 -108
  85. package/dist/capture/progress.js +0 -234
  86. package/dist/capture/report.d.ts +0 -75
  87. package/dist/capture/report.js +0 -267
  88. package/dist/capture/scripts.d.ts +0 -26
  89. package/dist/capture/scripts.js +0 -33
  90. package/dist/capture/state.d.ts +0 -296
  91. package/dist/capture/state.js +0 -43
  92. package/dist/capture/trial.d.ts +0 -34
  93. package/dist/capture/trial.js +0 -89
  94. package/dist/capture-cli.d.ts +0 -1
  95. package/dist/chat-commands.d.ts +0 -17
  96. package/dist/chat-idle.d.ts +0 -7
  97. package/dist/chat-idle.js +0 -20
  98. package/dist/chat-models.d.ts +0 -22
  99. package/dist/chat-records.d.ts +0 -50
  100. package/dist/chat-records.js +0 -107
  101. package/dist/chat-scope.d.ts +0 -14
  102. package/dist/chat-scope.js +0 -15
  103. package/dist/chat-skills.d.ts +0 -17
  104. package/dist/chat-skills.js +0 -18
  105. package/dist/chat-tab-header.d.ts +0 -15
  106. package/dist/chat-tabs.d.ts +0 -26
  107. package/dist/chat-terminal.d.ts +0 -24
  108. package/dist/chat-ui.d.ts +0 -33
  109. package/dist/chat-waiting.d.ts +0 -67
  110. package/dist/chats.d.ts +0 -343
  111. package/dist/chats.js +0 -1010
  112. package/dist/cli-options.d.ts +0 -24
  113. package/dist/cli.d.ts +0 -9
  114. package/dist/config-edit.d.ts +0 -83
  115. package/dist/config-edit.js +0 -391
  116. package/dist/config.d.ts +0 -428
  117. package/dist/config.js +0 -811
  118. package/dist/conform-cli.d.ts +0 -1
  119. package/dist/conformance-switch.d.ts +0 -25
  120. package/dist/conformance-switch.js +0 -86
  121. package/dist/cultivate-cli.d.ts +0 -1
  122. package/dist/doctor-tool.d.ts +0 -11
  123. package/dist/doctor-tool.js +0 -33
  124. package/dist/drift-cli.d.ts +0 -1
  125. package/dist/environment.d.ts +0 -37
  126. package/dist/environment.js +0 -109
  127. package/dist/extension.d.ts +0 -209
  128. package/dist/genome.d.ts +0 -77
  129. package/dist/genome.js +0 -288
  130. package/dist/graph.d.ts +0 -52
  131. package/dist/graph.js +0 -247
  132. package/dist/host-session.d.ts +0 -112
  133. package/dist/host-session.js +0 -103
  134. package/dist/host.d.ts +0 -40
  135. package/dist/host.js +0 -54
  136. package/dist/identity.d.ts +0 -7
  137. package/dist/identity.js +0 -75
  138. package/dist/init-config.d.ts +0 -169
  139. package/dist/init-config.js +0 -841
  140. package/dist/installed-providers.d.ts +0 -40
  141. package/dist/installed-providers.js +0 -98
  142. package/dist/jellyfish.d.ts +0 -40
  143. package/dist/judge.d.ts +0 -25
  144. package/dist/judge.js +0 -62
  145. package/dist/launch-agent.d.ts +0 -62
  146. package/dist/launch-agent.js +0 -339
  147. package/dist/launch-cli.d.ts +0 -1
  148. package/dist/launch-session.d.ts +0 -68
  149. package/dist/launch-session.js +0 -225
  150. package/dist/launch-tools.d.ts +0 -28
  151. package/dist/launch-tools.js +0 -72
  152. package/dist/launch-track.d.ts +0 -175
  153. package/dist/launch-track.js +0 -497
  154. package/dist/lineage-cli.d.ts +0 -1
  155. package/dist/loop-cli.d.ts +0 -35
  156. package/dist/loop-tools.d.ts +0 -103
  157. package/dist/loop-tools.js +0 -361
  158. package/dist/model-check.d.ts +0 -72
  159. package/dist/model-check.js +0 -162
  160. package/dist/module-report.d.ts +0 -9
  161. package/dist/new-project.d.ts +0 -10
  162. package/dist/new-project.js +0 -42
  163. package/dist/notice.d.ts +0 -115
  164. package/dist/notice.js +0 -61
  165. package/dist/parse-cli.d.ts +0 -1
  166. package/dist/parse-tool.d.ts +0 -9
  167. package/dist/parse-tool.js +0 -33
  168. package/dist/pi-launch.d.ts +0 -1
  169. package/dist/pi-settings.d.ts +0 -4
  170. package/dist/pi-themes.d.ts +0 -3
  171. package/dist/pi.d.ts +0 -248
  172. package/dist/pi.js +0 -889
  173. package/dist/picture-row.d.ts +0 -10
  174. package/dist/plain/check.d.ts +0 -63
  175. package/dist/plain/check.js +0 -236
  176. package/dist/plain/concepts.d.ts +0 -37
  177. package/dist/plain/concepts.js +0 -283
  178. package/dist/plain/cycles.d.ts +0 -21
  179. package/dist/plain/cycles.js +0 -190
  180. package/dist/plain/errors.d.ts +0 -26
  181. package/dist/plain/errors.js +0 -50
  182. package/dist/plain/files.d.ts +0 -47
  183. package/dist/plain/files.js +0 -161
  184. package/dist/plain/graph.d.ts +0 -107
  185. package/dist/plain/graph.js +0 -194
  186. package/dist/plain/highlight.d.ts +0 -43
  187. package/dist/plain/highlight.js +0 -196
  188. package/dist/plain/index.d.ts +0 -18
  189. package/dist/plain/index.js +0 -18
  190. package/dist/plain/liquid.d.ts +0 -22
  191. package/dist/plain/liquid.js +0 -124
  192. package/dist/plain/markdown.d.ts +0 -103
  193. package/dist/plain/markdown.js +0 -330
  194. package/dist/plain/module-concepts.d.ts +0 -32
  195. package/dist/plain/module-concepts.js +0 -80
  196. package/dist/plain/parser.d.ts +0 -163
  197. package/dist/plain/parser.js +0 -930
  198. package/dist/plain/plain.tmLanguage.json +0 -150
  199. package/dist/plain/project.d.ts +0 -48
  200. package/dist/plain/project.js +0 -155
  201. package/dist/plain/spec.d.ts +0 -152
  202. package/dist/plain/spec.js +0 -265
  203. package/dist/plain/stdlib.d.ts +0 -16
  204. package/dist/plain/stdlib.js +0 -48
  205. package/dist/plain/test-plain-file.d.ts +0 -59
  206. package/dist/plain/test-plain-file.js +0 -232
  207. package/dist/plain-code-blocks.d.ts +0 -14
  208. package/dist/plain-files.d.ts +0 -21
  209. package/dist/plain-files.js +0 -156
  210. package/dist/pointer-hover.d.ts +0 -12
  211. package/dist/question-dialog.d.ts +0 -60
  212. package/dist/questioning.d.ts +0 -55
  213. package/dist/questioning.js +0 -109
  214. package/dist/quiet.d.ts +0 -34
  215. package/dist/regenerate/activity.d.ts +0 -227
  216. package/dist/regenerate/activity.js +0 -250
  217. package/dist/regenerate/agent-env.d.ts +0 -51
  218. package/dist/regenerate/agent-env.js +0 -311
  219. package/dist/regenerate/agent-shell.d.ts +0 -54
  220. package/dist/regenerate/agent-shell.js +0 -121
  221. package/dist/regenerate/arbiter.d.ts +0 -68
  222. package/dist/regenerate/arbiter.js +0 -133
  223. package/dist/regenerate/audit.d.ts +0 -69
  224. package/dist/regenerate/audit.js +0 -212
  225. package/dist/regenerate/base-folder.d.ts +0 -70
  226. package/dist/regenerate/base-folder.js +0 -186
  227. package/dist/regenerate/cases.d.ts +0 -12
  228. package/dist/regenerate/cases.js +0 -149
  229. package/dist/regenerate/change-view.d.ts +0 -23
  230. package/dist/regenerate/change-view.js +0 -153
  231. package/dist/regenerate/chunk-plan.d.ts +0 -217
  232. package/dist/regenerate/chunk-plan.js +0 -937
  233. package/dist/regenerate/codebase.d.ts +0 -21
  234. package/dist/regenerate/codebase.js +0 -75
  235. package/dist/regenerate/command-check.d.ts +0 -66
  236. package/dist/regenerate/command-check.js +0 -577
  237. package/dist/regenerate/compaction.d.ts +0 -13
  238. package/dist/regenerate/compaction.js +0 -20
  239. package/dist/regenerate/confine.d.ts +0 -69
  240. package/dist/regenerate/confine.js +0 -311
  241. package/dist/regenerate/conform.d.ts +0 -66
  242. package/dist/regenerate/conform.js +0 -132
  243. package/dist/regenerate/conformance-agents.d.ts +0 -388
  244. package/dist/regenerate/conformance-agents.js +0 -1162
  245. package/dist/regenerate/conformance.d.ts +0 -191
  246. package/dist/regenerate/conformance.js +0 -1035
  247. package/dist/regenerate/conversation-writes.d.ts +0 -10
  248. package/dist/regenerate/conversation-writes.js +0 -100
  249. package/dist/regenerate/credentials.d.ts +0 -18
  250. package/dist/regenerate/credentials.js +0 -88
  251. package/dist/regenerate/debug-log.d.ts +0 -56
  252. package/dist/regenerate/debug-log.js +0 -236
  253. package/dist/regenerate/debugger.d.ts +0 -36
  254. package/dist/regenerate/debugger.js +0 -133
  255. package/dist/regenerate/delivery.d.ts +0 -2
  256. package/dist/regenerate/diagnose-job.d.ts +0 -2
  257. package/dist/regenerate/diagnose-job.js +0 -40
  258. package/dist/regenerate/diagnose.d.ts +0 -46
  259. package/dist/regenerate/diagnose.js +0 -92
  260. package/dist/regenerate/diff-view.d.ts +0 -64
  261. package/dist/regenerate/drift.d.ts +0 -120
  262. package/dist/regenerate/drift.js +0 -285
  263. package/dist/regenerate/environment-error.d.ts +0 -167
  264. package/dist/regenerate/environment-error.js +0 -342
  265. package/dist/regenerate/failure-reports.d.ts +0 -28
  266. package/dist/regenerate/failure-reports.js +0 -79
  267. package/dist/regenerate/job-log.d.ts +0 -30
  268. package/dist/regenerate/job-log.js +0 -105
  269. package/dist/regenerate/job-panel.d.ts +0 -20
  270. package/dist/regenerate/job-panel.js +0 -54
  271. package/dist/regenerate/jobs-tree.d.ts +0 -76
  272. package/dist/regenerate/jobs.d.ts +0 -231
  273. package/dist/regenerate/jobs.js +0 -522
  274. package/dist/regenerate/lanes.d.ts +0 -16
  275. package/dist/regenerate/lanes.js +0 -32
  276. package/dist/regenerate/launch.d.ts +0 -256
  277. package/dist/regenerate/launch.js +0 -689
  278. package/dist/regenerate/ledger-view.d.ts +0 -87
  279. package/dist/regenerate/ledger-view.js +0 -325
  280. package/dist/regenerate/ledger.d.ts +0 -368
  281. package/dist/regenerate/ledger.js +0 -357
  282. package/dist/regenerate/lineage.d.ts +0 -105
  283. package/dist/regenerate/lineage.js +0 -485
  284. package/dist/regenerate/list-arguments.d.ts +0 -21
  285. package/dist/regenerate/list-arguments.js +0 -121
  286. package/dist/regenerate/loop.d.ts +0 -423
  287. package/dist/regenerate/loop.js +0 -2087
  288. package/dist/regenerate/masking.d.ts +0 -19
  289. package/dist/regenerate/masking.js +0 -95
  290. package/dist/regenerate/model-names.d.ts +0 -33
  291. package/dist/regenerate/model-names.js +0 -92
  292. package/dist/regenerate/notes.d.ts +0 -159
  293. package/dist/regenerate/notes.js +0 -446
  294. package/dist/regenerate/os-sandbox.d.ts +0 -93
  295. package/dist/regenerate/os-sandbox.js +0 -283
  296. package/dist/regenerate/panel-dock.d.ts +0 -23
  297. package/dist/regenerate/paths.d.ts +0 -110
  298. package/dist/regenerate/paths.js +0 -190
  299. package/dist/regenerate/plain-palette.d.ts +0 -34
  300. package/dist/regenerate/prompt.d.ts +0 -230
  301. package/dist/regenerate/prompt.js +0 -741
  302. package/dist/regenerate/pulse-files.d.ts +0 -14
  303. package/dist/regenerate/pulse-files.js +0 -63
  304. package/dist/regenerate/records.d.ts +0 -132
  305. package/dist/regenerate/records.js +0 -327
  306. package/dist/regenerate/regenerate.d.ts +0 -106
  307. package/dist/regenerate/regenerate.js +0 -660
  308. package/dist/regenerate/regression.d.ts +0 -58
  309. package/dist/regenerate/regression.js +0 -188
  310. package/dist/regenerate/renames.d.ts +0 -42
  311. package/dist/regenerate/renames.js +0 -185
  312. package/dist/regenerate/requires.d.ts +0 -117
  313. package/dist/regenerate/requires.js +0 -377
  314. package/dist/regenerate/resources.d.ts +0 -57
  315. package/dist/regenerate/resources.js +0 -162
  316. package/dist/regenerate/scripts-being-written.d.ts +0 -19
  317. package/dist/regenerate/scripts-being-written.js +0 -30
  318. package/dist/regenerate/self-check.d.ts +0 -29
  319. package/dist/regenerate/self-check.js +0 -119
  320. package/dist/regenerate/services.d.ts +0 -28
  321. package/dist/regenerate/services.js +0 -158
  322. package/dist/regenerate/shell.d.ts +0 -91
  323. package/dist/regenerate/shell.js +0 -320
  324. package/dist/regenerate/side-panel.d.ts +0 -64
  325. package/dist/regenerate/spec-map-view.d.ts +0 -147
  326. package/dist/regenerate/spec-map.d.ts +0 -160
  327. package/dist/regenerate/spec-map.js +0 -596
  328. package/dist/regenerate/spec-steps.d.ts +0 -180
  329. package/dist/regenerate/spec-steps.js +0 -729
  330. package/dist/regenerate/standing.d.ts +0 -28
  331. package/dist/regenerate/standing.js +0 -30
  332. package/dist/regenerate/state.d.ts +0 -21
  333. package/dist/regenerate/state.js +0 -10
  334. package/dist/regenerate/steering.d.ts +0 -56
  335. package/dist/regenerate/steering.js +0 -119
  336. package/dist/regenerate/stop-report.d.ts +0 -43
  337. package/dist/regenerate/stop-report.js +0 -160
  338. package/dist/regenerate/submit-work.d.ts +0 -44
  339. package/dist/regenerate/submit-work.js +0 -76
  340. package/dist/regenerate/test-kinds.d.ts +0 -85
  341. package/dist/regenerate/test-kinds.js +0 -171
  342. package/dist/regenerate/test-scripts.d.ts +0 -240
  343. package/dist/regenerate/test-scripts.js +0 -847
  344. package/dist/regenerate/testing-steps.d.ts +0 -52
  345. package/dist/regenerate/testing-steps.js +0 -129
  346. package/dist/regenerate/testing.d.ts +0 -150
  347. package/dist/regenerate/testing.js +0 -438
  348. package/dist/regenerate/transcript-view.d.ts +0 -21
  349. package/dist/regenerate/unit-gate.d.ts +0 -27
  350. package/dist/regenerate/unit-gate.js +0 -20
  351. package/dist/regenerate/unit-review.d.ts +0 -152
  352. package/dist/regenerate/unit-review.js +0 -361
  353. package/dist/regenerate/web.d.ts +0 -61
  354. package/dist/regenerate/web.js +0 -256
  355. package/dist/regenerate/workspace.d.ts +0 -12
  356. package/dist/regenerate/workspace.js +0 -99
  357. package/dist/regenerate-cli.d.ts +0 -1
  358. package/dist/reopen.d.ts +0 -29
  359. package/dist/resume-line.d.ts +0 -5
  360. package/dist/review/live.d.ts +0 -72
  361. package/dist/review/live.js +0 -166
  362. package/dist/rules.d.ts +0 -20
  363. package/dist/rules.js +0 -47
  364. package/dist/run-report.d.ts +0 -88
  365. package/dist/run-report.js +0 -338
  366. package/dist/screen-padding.d.ts +0 -28
  367. package/dist/self-invocation.d.ts +0 -36
  368. package/dist/self-invocation.js +0 -137
  369. package/dist/sentinel-chat.d.ts +0 -19
  370. package/dist/sentinel-chat.js +0 -226
  371. package/dist/sentinel-check.d.ts +0 -36
  372. package/dist/sentinel-check.js +0 -78
  373. package/dist/sentinel.d.ts +0 -107
  374. package/dist/sentinel.js +0 -601
  375. package/dist/settings.d.ts +0 -45
  376. package/dist/settings.js +0 -378
  377. package/dist/setup.d.ts +0 -97
  378. package/dist/setup.js +0 -436
  379. package/dist/skill-progress.d.ts +0 -46
  380. package/dist/skill.d.ts +0 -102
  381. package/dist/skill.js +0 -147
  382. package/dist/skills.d.ts +0 -54
  383. package/dist/skills.js +0 -111
  384. package/dist/spawn-async.d.ts +0 -18
  385. package/dist/spawn-async.js +0 -35
  386. package/dist/stack.d.ts +0 -80
  387. package/dist/stack.js +0 -206
  388. package/dist/stdlib.d.ts +0 -43
  389. package/dist/stdlib.js +0 -118
  390. package/dist/surface.d.ts +0 -5
  391. package/dist/surface.js +0 -18
  392. package/dist/terminal-images.d.ts +0 -2
  393. package/dist/terminal-notifications.d.ts +0 -31
  394. package/dist/test-plain-files.d.ts +0 -41
  395. package/dist/test-plain-files.js +0 -172
  396. package/dist/tools.d.ts +0 -101
  397. package/dist/tools.js +0 -242
  398. package/dist/turri-versions.d.ts +0 -71
  399. package/genome/capture/capture.md +0 -26
  400. package/genome/capture/check-conventions.md +0 -5
  401. package/genome/capture/check-reference.md +0 -11
  402. package/genome/capture/concepts.md +0 -3
  403. package/genome/capture/divide.md +0 -9
  404. package/genome/capture/feature.md +0 -45
  405. package/genome/capture/interface.md +0 -9
  406. package/genome/capture/modules.md +0 -23
  407. package/genome/capture/outline.md +0 -11
  408. package/genome/capture/readability.md +0 -12
  409. package/genome/capture/reference.md +0 -10
  410. package/genome/capture/split.md +0 -9
  411. package/genome/capture/survey.md +0 -37
  412. package/genome/capture/trial.md +0 -18
  413. package/genome/capture/verify.md +0 -7
  414. package/genome/rules/bullet-continuation.md +0 -61
  415. package/genome/rules/concise-specs-examples.md +0 -460
  416. package/genome/rules/concise-specs-integration-examples.md +0 -281
  417. package/genome/rules/concise-specs.md +0 -80
  418. package/genome/rules/definitions.md +0 -107
  419. package/genome/rules/examples/integration-embedded-testing/run_conformance_tests_java.sh +0 -161
  420. package/genome/rules/examples/integration-embedded-testing/run_unittests_java.sh +0 -50
  421. package/genome/rules/exported-concepts.md +0 -39
  422. package/genome/rules/func-specs.md +0 -164
  423. package/genome/rules/impl-reqs.md +0 -68
  424. package/genome/rules/import-modules.md +0 -49
  425. package/genome/rules/integration-embedded-testing.md +0 -273
  426. package/genome/rules/integration-embedded.md +0 -171
  427. package/genome/rules/integration-standalone.md +0 -135
  428. package/genome/rules/integrations.md +0 -136
  429. package/genome/rules/linked-resources.md +0 -76
  430. package/genome/rules/module-structure.md +0 -112
  431. package/genome/rules/project-model.md +0 -69
  432. package/genome/rules/required-concepts.md +0 -44
  433. package/genome/rules/requires-modules.md +0 -81
  434. package/genome/rules/semantic-ids.md +0 -49
  435. package/genome/rules/stdlib.md +0 -37
  436. package/genome/rules/test-plain-files.md +0 -138
  437. package/genome/rules/test-reqs.md +0 -57
  438. package/genome/rules/turri-regeneration.md +0 -66
  439. package/genome/skills/analyze-2-func-specs/SKILL.md +0 -116
  440. package/genome/skills/analyze-func-specs/SKILL.md +0 -137
  441. package/genome/skills/break-down-func-spec/SKILL.md +0 -229
  442. package/genome/skills/consolidate-concepts/SKILL.md +0 -192
  443. package/genome/skills/convert-old-syntax/SKILL.md +0 -68
  444. package/genome/skills/convert-old-syntax/references/rubric.md +0 -11
  445. package/genome/skills/debug-specs/SKILL.md +0 -194
  446. package/genome/skills/implement-conformance-testing-script/SKILL.md +0 -247
  447. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_cypress.ps1 +0 -337
  448. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_golang.ps1 +0 -111
  449. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +0 -151
  450. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.ps1 +0 -103
  451. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +0 -146
  452. package/genome/skills/implement-unit-testing-script/SKILL.md +0 -171
  453. package/genome/skills/implement-unit-testing-script/assets/run_unittests_flutter.ps1 +0 -87
  454. package/genome/skills/implement-unit-testing-script/assets/run_unittests_golang.ps1 +0 -73
  455. package/genome/skills/implement-unit-testing-script/assets/run_unittests_java.sh +0 -82
  456. package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.ps1 +0 -81
  457. package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.sh +0 -102
  458. package/genome/skills/implement-unit-testing-script/assets/run_unittests_react.ps1 +0 -87
  459. package/genome/skills/refactor-module/SKILL.md +0 -218
  460. package/genome/skills/resolve-section-ownership/SKILL.md +0 -64
  461. package/genome/skills/resolve-spec-conflict/SKILL.md +0 -102
  462. package/stdlib/backend/common.plain +0 -25
  463. package/stdlib/backend/conformance/common.plain +0 -12
  464. package/stdlib/backend/conformance/go-gin.plain +0 -9
  465. package/stdlib/backend/conformance/go-nethttp.plain +0 -9
  466. package/stdlib/backend/conformance/java-springboot.plain +0 -9
  467. package/stdlib/backend/conformance/python-django.plain +0 -9
  468. package/stdlib/backend/conformance/python-fastapi.plain +0 -9
  469. package/stdlib/backend/conformance/python-flask.plain +0 -9
  470. package/stdlib/backend/conformance/rust-axum.plain +0 -9
  471. package/stdlib/backend/conformance/typescript-express.plain +0 -9
  472. package/stdlib/backend/conformance/typescript-fastify.plain +0 -9
  473. package/stdlib/backend/conformance/typescript-nestjs.plain +0 -9
  474. package/stdlib/backend/go-gin.plain +0 -18
  475. package/stdlib/backend/go-nethttp.plain +0 -18
  476. package/stdlib/backend/java-springboot.plain +0 -19
  477. package/stdlib/backend/python-django.plain +0 -19
  478. package/stdlib/backend/python-fastapi.plain +0 -23
  479. package/stdlib/backend/python-flask.plain +0 -23
  480. package/stdlib/backend/rust-axum.plain +0 -17
  481. package/stdlib/backend/typescript-express.plain +0 -19
  482. package/stdlib/backend/typescript-fastify.plain +0 -19
  483. package/stdlib/backend/typescript-nestjs.plain +0 -19
  484. package/stdlib/cli/common.plain +0 -17
  485. package/stdlib/cli/conformance/common.plain +0 -11
  486. package/stdlib/cli/conformance/go-cobra.plain +0 -9
  487. package/stdlib/cli/conformance/go-flag.plain +0 -9
  488. package/stdlib/cli/conformance/java-picocli.plain +0 -9
  489. package/stdlib/cli/conformance/python-argparse.plain +0 -9
  490. package/stdlib/cli/conformance/python-click.plain +0 -9
  491. package/stdlib/cli/conformance/python-typer.plain +0 -9
  492. package/stdlib/cli/conformance/rust-clap.plain +0 -9
  493. package/stdlib/cli/conformance/typescript-commander.plain +0 -9
  494. package/stdlib/cli/go-cobra.plain +0 -14
  495. package/stdlib/cli/go-flag.plain +0 -14
  496. package/stdlib/cli/java-picocli.plain +0 -15
  497. package/stdlib/cli/python-argparse.plain +0 -18
  498. package/stdlib/cli/python-click.plain +0 -16
  499. package/stdlib/cli/python-typer.plain +0 -16
  500. package/stdlib/cli/rust-clap.plain +0 -14
  501. package/stdlib/cli/typescript-commander.plain +0 -17
  502. package/stdlib/frontend/angular.plain +0 -17
  503. package/stdlib/frontend/common.plain +0 -17
  504. package/stdlib/frontend/conformance/angular.plain +0 -5
  505. package/stdlib/frontend/conformance/common.plain +0 -11
  506. package/stdlib/frontend/conformance/react-vite.plain +0 -5
  507. package/stdlib/frontend/conformance/sveltekit-spa.plain +0 -5
  508. package/stdlib/frontend/conformance/vue-vite.plain +0 -5
  509. package/stdlib/frontend/react-vite.plain +0 -16
  510. package/stdlib/frontend/sveltekit-spa.plain +0 -16
  511. package/stdlib/frontend/vue-vite.plain +0 -16
  512. package/stdlib/lang/go.plain +0 -13
  513. package/stdlib/lang/java.plain +0 -12
  514. package/stdlib/lang/python.plain +0 -18
  515. package/stdlib/lang/rust.plain +0 -12
  516. package/stdlib/lang/typescript.plain +0 -13
  517. package/stdlib/library/common.plain +0 -15
  518. package/stdlib/library/conformance/common.plain +0 -9
  519. package/stdlib/library/conformance/go.plain +0 -9
  520. package/stdlib/library/conformance/java-gradle.plain +0 -9
  521. package/stdlib/library/conformance/java-maven.plain +0 -9
  522. package/stdlib/library/conformance/python.plain +0 -9
  523. package/stdlib/library/conformance/rust.plain +0 -9
  524. package/stdlib/library/conformance/typescript.plain +0 -9
  525. package/stdlib/library/go.plain +0 -12
  526. package/stdlib/library/java-gradle.plain +0 -13
  527. package/stdlib/library/java-maven.plain +0 -13
  528. package/stdlib/library/python.plain +0 -13
  529. package/stdlib/library/rust.plain +0 -12
  530. package/stdlib/library/typescript.plain +0 -15
@@ -1,42 +0,0 @@
1
- /**
2
- * Starting a project from the conversation: the person says what they want built - "create a small server in Java
3
- * Spring Boot" - and the chat writes the ***plain itself, here, with no skill, regenerating from the first functional spec.
4
- */
5
- export const NEW_PROJECT = [
6
- "<new-project>",
7
- "When the person asks for new software / project and there is no ***plain module for it yet, or they ask for a new",
8
- "project, start it yourself, without asking how. How soon the first pulse starts, and something they can try, come first:",
9
- "1. The stack: the one they named; otherwise one of the standard library's that this machine can build - common,",
10
- " simple - said in a line. A stack named in a language the machine lacks is written all the same: tell them what to",
11
- " install, and that turri doctor checks it. Read the stack's template, its language's and its kind's common first.",
12
- "2. One module - a .plain file in the project's root, named after what it is (server.plain) - importing the stack and",
13
- " writing only what the module needs beyond it. Two side by side, each on its stack, only when it needs two stacks.",
14
- "3. config.turri.yaml: module: the new file. What a config there already settles - a stack, a script - is kept, not",
15
- " chosen again.",
16
- "4. The unit testing script: keep one turri already finds; otherwise start cultivate with implement-unit-testing-script,",
17
- " plainFile the new module. It runs in the background: go straight on - the module's pulses wait for the script.",
18
- " Tests only once conformance tests are on: they make each change take about twice as long, so the person turns them",
19
- " on - asked for tests, tell them /conform does - then in this order: the ***test reqs*** - the stack's conformance template - then cultivate with",
20
- " implement-conformance-testing-script, in the background too, then the scenarios.",
21
- "5. The first functional spec: the smallest thing that runs and shows something - the server answers GET / with the",
22
- " app's name, the CLI prints its usage - with no test plain file, unless they asked for tests. parse, fix",
23
- " what it finds, and regenerate at once.",
24
- "6. While it regenerates: the main thing they described, on its happy path, and at most one more - each a functional",
25
- " spec, with its concepts, and a test plain file only if they asked for tests - then parse and regenerate",
26
- " again. Only what they described: they named only the kind of software, write none, and invite them to say what",
27
- " it does. No validation or edge cases yet.",
28
- "Then hand over in a few lines: what you chose, what is regenerating, and the next slices you would write - they say",
29
- "go on, or what to change, and every change after is ***plain you write and regenerate.",
30
- "</new-project>",
31
- ].join("\n");
32
- /**
33
- * Bringing an existing codebase under ***plain: the person starts /capture, never the chat - it runs a while, and turns
34
- * conformance tests on in the project it writes.
35
- */
36
- export const CAPTURE_HINT = [
37
- "<capture>",
38
- "When the person wants an existing codebase brought under ***plain - written down as ***plain, to work on from then on",
39
- "instead of the code - tell them /capture [path] does it: in the background, asking nothing, into <path>/plain, with a",
40
- "report of what it decided. Only they start it; you cannot.",
41
- "</capture>",
42
- ].join("\n");
package/dist/notice.d.ts DELETED
@@ -1,115 +0,0 @@
1
- import type { Job } from "./regenerate/jobs.ts";
2
- /**
3
- * The sentinel's name and its notices - what it puts to the person - with nothing else: the session's chats (chats.ts)
4
- * hold them, and load early, before the sentinel's tools and what they need (sentinel.ts) can be.
5
- */
6
- /** Its name in the strip, the host's chat list, and the ledger. */
7
- export declare const SENTINEL = "sentinel";
8
- export type ChatRole = typeof SENTINEL;
9
- export type NoticeSeverity = "error" | "warning" | "info";
10
- /** One thing the person can do about a notice: accepted, the focused chat's agent is started on `task`. */
11
- export interface NoticeAction {
12
- label: string;
13
- task: string;
14
- }
15
- export interface NoticeInput {
16
- /**
17
- * `sentinel-start`: not something wrong but a question turri puts before the sentinel first opens in a session - its
18
- * actions start it, or not, and are turri's to carry out, not the chat's agent's (SENTINEL_START). `fixed`: the
19
- * sentinel says what it fixed itself in the project's tooling - a testing script, its config - with nothing to answer:
20
- * a note, never put as a question, and never superseding a notice about its module. None: the sentinel's.
21
- */
22
- kind?: "sentinel-start" | "fixed";
23
- severity: NoticeSeverity;
24
- /** What is wrong, in a line. */
25
- summary: string;
26
- /** What shows it: a step that failed, a log's lines, a test's output. */
27
- evidence: string[];
28
- actions: NoticeAction[];
29
- module?: string;
30
- /** The pulse it is about: its job id. */
31
- job?: string;
32
- /** Its number among its module's pulses. */
33
- pulse?: number;
34
- /** The check it is about, when a host asked the sentinel to check functional specs (`SentinelCheck`): its id. */
35
- check?: string;
36
- /**
37
- * The person may leave it as the build has it, for good (`{ ignore: true }`): a gap in the ***plain the build settled
38
- * with an assumption - never something broken, a pulse that went wrong, a launch that did not come up, nor the
39
- * question whether to start the sentinel.
40
- */
41
- ignorable?: boolean;
42
- }
43
- export type NoticeState = "open" | "accepted" | "steered" | "dismissed" | "ignored" | "superseded";
44
- export interface Notice extends NoticeInput {
45
- id: string;
46
- /** The chat it is put in: the one the person looks at, never the sentinel's. */
47
- chat: string;
48
- state: NoticeState;
49
- at: string;
50
- }
51
- /** The answers to the question put before the sentinel first opens: the actions of a `sentinel-start` notice, in order. */
52
- export declare const SENTINEL_START: {
53
- readonly start: "Start the sentinel";
54
- readonly always: "Start it, and don't ask again";
55
- readonly notNow: "Not this session";
56
- readonly never: "Turn it off for this project";
57
- };
58
- export type SentinelStartChoice = keyof typeof SENTINEL_START;
59
- /**
60
- * How the person answered a notice: one of its actions (by index or label), their own words, not at all this once
61
- * (`dismiss`) - or, on an ignorable one, not at all and not again (`ignore`): left as the build has it.
62
- */
63
- export type NoticeAnswer = {
64
- action: number | string;
65
- } | {
66
- steer: string;
67
- } | {
68
- dismiss: true;
69
- } | {
70
- ignore: true;
71
- };
72
- export declare function newNotice(input: NoticeInput, chat: string): Notice;
73
- /** The choice an answer to a `sentinel-start` notice makes: dismissed, or answered in the person's own words, it is not now. */
74
- export declare function sentinelStartChoice(notice: Notice, answer: NoticeAnswer): SentinelStartChoice;
75
- /** What the focused chat's agent is asked to do once the person answered a notice - undefined when they dismissed it. */
76
- export declare function noticeTask(notice: Notice, answer: NoticeAnswer): string | undefined;
77
- /**
78
- * What the sentinel keeps of a notice the person ignored, in its guidance: what was left as it is - its module, the gap,
79
- * what the build does - and why, so a fresh conversation does not raise it again.
80
- */
81
- export declare function ignoredGuidance(notice: Notice): string;
82
- /** A notice in words: its summary, its evidence and what can be done - for the agent, the log and a chat without a card. */
83
- export declare function describeNotice(notice: NoticeInput): string;
84
- /** Whether a pulse went wrong: failed, stopped, or ran to its end with what it built not passing. */
85
- export declare function wentWrong(job: Job): boolean;
86
- /**
87
- * The sentinel done with a pulse - or a check a host asked for: whether what it checked holds, and what it checked and
88
- * found, in a line or two. `unchecked`: a pulse or a check that was never checked - the person did not start the
89
- * sentinel, it could not be opened, nothing of the module is launched to test a check in, or what runs cannot hold a
90
- * pulse's commit - turri's own word, never the sentinel's.
91
- */
92
- export interface Conclusion {
93
- /** The pulse: its job id. Undefined for a check. */
94
- job?: string;
95
- /** The check: its id (`SentinelCheck`). Undefined for a pulse. */
96
- check?: string;
97
- verdict: "holds" | "wrong" | "unchecked";
98
- summary: string;
99
- module?: string;
100
- pulse?: number;
101
- }
102
- /**
103
- * Functional specs of a module a host asked the sentinel to check, in what is launched of the module: its codebase's code,
104
- * which holds every module its requires chain builds on. Queued with the pulses, in a conversation of its own.
105
- */
106
- export interface SentinelCheck {
107
- id: string;
108
- /** The module whose launch is tested, by name. */
109
- module: string;
110
- plainFile: string;
111
- /** The functional specs to test, each `module:func-id` - of the module, or of a module its requires chain builds on. */
112
- funcIds: string[];
113
- /** When it was asked for. */
114
- at: string;
115
- }
package/dist/notice.js DELETED
@@ -1,61 +0,0 @@
1
- import { randomUUID } from "node:crypto";
2
- /**
3
- * The sentinel's name and its notices - what it puts to the person - with nothing else: the session's chats (chats.ts)
4
- * hold them, and load early, before the sentinel's tools and what they need (sentinel.ts) can be.
5
- */
6
- /** Its name in the strip, the host's chat list, and the ledger. */
7
- export const SENTINEL = "sentinel";
8
- /** The answers to the question put before the sentinel first opens: the actions of a `sentinel-start` notice, in order. */
9
- export const SENTINEL_START = {
10
- start: "Start the sentinel",
11
- always: "Start it, and don't ask again",
12
- notNow: "Not this session",
13
- never: "Turn it off for this project",
14
- };
15
- export function newNotice(input, chat) {
16
- return { ...input, id: randomUUID().slice(0, 8), chat, state: "open", at: new Date().toISOString() };
17
- }
18
- /** The choice an answer to a `sentinel-start` notice makes: dismissed, or answered in the person's own words, it is not now. */
19
- export function sentinelStartChoice(notice, answer) {
20
- if (!("action" in answer))
21
- return "notNow";
22
- const label = typeof answer.action === "number" ? notice.actions[answer.action]?.label : answer.action;
23
- return Object.keys(SENTINEL_START).find((choice) => SENTINEL_START[choice] === label) ?? "notNow";
24
- }
25
- /** What the focused chat's agent is asked to do once the person answered a notice - undefined when they dismissed it. */
26
- export function noticeTask(notice, answer) {
27
- if ("dismiss" in answer || "ignore" in answer)
28
- return undefined;
29
- const head = [
30
- `The sentinel put this to the person, about ${notice.module !== undefined ? `${notice.module}${notice.pulse !== undefined ? ` pulse ${notice.pulse}` : ""}` : "the work"}:`,
31
- describeNotice(notice),
32
- "",
33
- ];
34
- if ("steer" in answer)
35
- return [...head, `The person answered it in their own words - do what they say:`, answer.steer.trim()].join("\n");
36
- const action = typeof answer.action === "number" ? notice.actions[answer.action] : notice.actions.find((candidate) => candidate.label === answer.action);
37
- if (action === undefined)
38
- return undefined;
39
- return [...head, `The person chose: ${action.label}. Do it now:`, action.task.trim()].join("\n");
40
- }
41
- /**
42
- * What the sentinel keeps of a notice the person ignored, in its guidance: what was left as it is - its module, the gap,
43
- * what the build does - and why, so a fresh conversation does not raise it again.
44
- */
45
- export function ignoredGuidance(notice) {
46
- const about = notice.module !== undefined ? ` in ${notice.module}` : "";
47
- const shows = notice.evidence.length > 0 ? ` (${notice.evidence.join("; ")})` : "";
48
- return `The person chose to leave this${about} as the build has it - do not raise it again unless the build no longer does what they accepted: ${notice.summary}${shows}`;
49
- }
50
- /** A notice in words: its summary, its evidence and what can be done - for the agent, the log and a chat without a card. */
51
- export function describeNotice(notice) {
52
- return [
53
- `${notice.severity === "error" ? "✗" : notice.severity === "warning" ? "!" : "·"} ${notice.summary}`,
54
- ...notice.evidence.map((line) => ` ${line}`),
55
- ...(notice.actions.length > 0 ? ["What can be done:", ...notice.actions.map((action, index) => ` ${index + 1}. ${action.label}`)] : []),
56
- ].join("\n");
57
- }
58
- /** Whether a pulse went wrong: failed, stopped, or ran to its end with what it built not passing. */
59
- export function wentWrong(job) {
60
- return job.status !== "succeeded" || job.details?.passed === false;
61
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { Type } from "typebox";
2
- /** parse, for the conversation and for the skills that write specs alike: it checks the ***plain, never the code. */
3
- export declare function checkPlainTool(cwd: string): import("@earendil-works/pi-coding-agent").ToolDefinition<Type.TObject<{
4
- target: Type.TString;
5
- template_dir: Type.TOptional<Type.TArray<Type.TString>>;
6
- }>, {
7
- failed: number;
8
- checked: number;
9
- }, any> & import("@earendil-works/pi-coding-agent").ToolDefinition<any, any, any>;
@@ -1,33 +0,0 @@
1
- import { resolve } from "node:path";
2
- import { defineTool } from "@earendil-works/pi-coding-agent";
3
- import { Type } from "typebox";
4
- import { checkPlainTargets, formatCheckResults } from "./plain/check.js";
5
- /** parse, for the conversation and for the skills that write specs alike: it checks the ***plain, never the code. */
6
- export function checkPlainTool(cwd) {
7
- return defineTool({
8
- name: "parse",
9
- label: "Parse ***plain",
10
- description: "Parse one or more .plain modules - their syntax and structure - without regenerating: each with its test plain files, its " +
11
- "imports and required modules, reporting every syntax, concept and structure error with the line it is on, " +
12
- "and every test plain file outside its module's folder. A module that passes lists each functional spec with its " +
13
- "test plain file and its scenarios - one with no test plain file is not tested. Pass a directory to " +
14
- "check every .plain module in it; a test plain file or test folder is refused - name its module. Fast, free, and offline. " +
15
- "It reads the ***plain alone: it runs no code and no test - whether the code does what the ***plain says is the conformance tests', with conform.",
16
- promptSnippet: "parse ***plain - its syntax and structure, never its code or tests - regenerating nothing",
17
- promptGuidelines: [
18
- "Run parse after editing a .plain file, and before telling the user it is ready. Never shell out to another renderer to check one.",
19
- ],
20
- parameters: Type.Object({
21
- target: Type.String({ description: "A .plain file, or a directory holding .plain files" }),
22
- template_dir: Type.Optional(Type.Array(Type.String(), { description: "Extra template directories" })),
23
- }),
24
- async execute(_id, params) {
25
- const results = checkPlainTargets(resolve(cwd, params.target), (params.template_dir ?? []).map((dir) => resolve(cwd, dir)));
26
- const failed = results.filter((result) => !result.ok).length;
27
- const text = results.length === 0
28
- ? `No .plain files found in ${params.target}.`
29
- : `${formatCheckResults(results)}\n\n${failed === 0 ? "All specs valid." : `${failed} of ${results.length} failed.`}`;
30
- return { content: [{ type: "text", text }], details: { failed, checked: results.length } };
31
- },
32
- });
33
- }
@@ -1 +0,0 @@
1
- import "./terminal-images.ts";
@@ -1,4 +0,0 @@
1
- /** Take pi's /settings over: once a process, every chat's screen. */
2
- export declare function takeOverSettings(): void;
3
- /** Open pi's own settings menu on the screen /settings was typed on. False where there is none - a host, print mode. */
4
- export declare function openPiSettings(): boolean;
@@ -1,3 +0,0 @@
1
- /** pi already picks the project's theme over the user's, then turri's bundled fallback. In the chat these copies
2
- * of a brand theme are expected; a broken file or a clash with a theme from elsewhere is still worth showing. */
3
- export declare function quietBrandThemeOverrides(cwd?: string, agentDir?: string): void;
package/dist/pi.d.ts DELETED
@@ -1,248 +0,0 @@
1
- import { AgentSession, DefaultResourceLoader, ModelRegistry, type ToolDefinition } from "@earendil-works/pi-coding-agent";
2
- import { type AgentRole } from "./config.ts";
3
- type ThinkingLevel = Parameters<AgentSession["setThinkingLevel"]>[0];
4
- /**
5
- * Where sub-agents take their thinking level from: the conversation that started them.
6
- *
7
- * The model is inherited explicitly, by name, all the way down. The thinking level is just
8
- * as much a choice the person made - and left alone pi falls back to its own default, so a
9
- * conversation turned down for speed would hand every render agent a slower one. Read at
10
- * the moment each session starts, so a change mid-conversation applies to the next agent.
11
- */
12
- export declare function inheritThinkingLevel(source: () => ThinkingLevel | undefined): void;
13
- /**
14
- * How hard an agent thinks: the level the config or the model it is given names; else its role's (ROLE_THINKING) - the
15
- * work thinks little, the judgement more; else the conversation's, for an agent with no role.
16
- */
17
- export declare function agentThinking(named: ThinkingLevel | undefined, role: AgentRole | undefined, conversation: () => ThinkingLevel | undefined): ThinkingLevel | undefined;
18
- /**
19
- * Where sub-agents take the providers pi's extensions registered from: the conversation that started them.
20
- *
21
- * A sub-agent is started without extensions (see subAgentResources), so its models are only what pi's own
22
- * configuration has - models.json and auth.json. A provider an extension registers - a company's own LLM
23
- * gateway, say - is in the conversation's model registry and nowhere else: the conversation could use its
24
- * models and a render or skill agent told to use them could not find them. So every sub-agent's model
25
- * runtime is given the providers the conversation's registry holds when the agent starts - the provider,
26
- * not the extension that registered it.
27
- */
28
- export declare function inheritProviders(source: () => ModelRegistry | undefined): void;
29
- /**
30
- * What a sub-agent session is made of: pi's resources without any extensions.
31
- *
32
- * Left to itself, pi builds every session from the user's configuration - including every
33
- * installed extension. When turri is installed globally, that means each render agent,
34
- * judge and skill executor loads a whole second copy of turri inside itself: its
35
- * tools, its hooks, its job registry, all bound to a session that is thrown away minutes
36
- * later. That copy then outlives its session in module state and breaks the next one. A
37
- * sub-agent is given exactly what it needs instead; for agents that work on specs, that
38
- * includes the ***plain rules, which otherwise only reached them through that stray copy.
39
- *
40
- * Nor any context file. pi puts every AGENTS.md / CLAUDE.md from the agent's folder up - the
41
- * project's, the user's ~/.pi/agent one - into its system prompt; a rendering agent works in
42
- * plain_modules/<module>/code, so it would be given whatever the project says about itself. An
43
- * agent turri starts sees only what turri gives it. The conversation still loads
44
- * them, as pi does.
45
- *
46
- * Nor any of pi's skills. pi lists every skill it finds - the user's, the project's - in the system prompt, for the
47
- * agent to load when one fits; an agent turri starts has one job, and turri runs its gated skills itself,
48
- * giving each step to an agent as its task. The conversation keeps them.
49
- */
50
- export declare function subAgentResources(cwd: string, withRules: boolean, system?: string): Promise<DefaultResourceLoader>;
51
- /** Raised when the provider itself failed, rather than the agent producing a poor answer. */
52
- export declare class ProviderError extends Error {
53
- constructor(message: string);
54
- }
55
- /**
56
- * End the agent's turn, turri's own doing - it is going round in a circle, its time is up. The turn ends as any turn
57
- * does: what the agent said stands, and the harness goes on from there. Never a provider error.
58
- */
59
- export declare function stopTurn(session: AgentSession | undefined, reason: string): void;
60
- /** A turn with one thing left to do: every tool but these is refused, the tools the session has left as they are. */
61
- export interface TurnOptions {
62
- onlyTools?: string[];
63
- }
64
- /** How many calls a restricted turn may have refused before it is stopped. */
65
- export declare const REFUSED_BEFORE_STOP = 3;
66
- /**
67
- * `run`, with every tool of the session but `names` refused (guardRepeats refuses them) until it ends. The tools
68
- * themselves are left as they are, so the tools the model is sent - and its prompt cache - stay the same.
69
- */
70
- export declare function withOnlyTools<T>(session: AgentSession, names: string[], run: () => Promise<T>): Promise<T>;
71
- export declare function ask(session: AgentSession, text: string, onDelta?: (delta: string) => void, turn?: TurnOptions): Promise<string>;
72
- /**
73
- * How many times, after pi's own retries, a turn whose provider failed for a moment is tried again; the first wait,
74
- * doubled each time up to the longest - 15s, 30s, 1m, 2m, 4m, 5m: an outage of about 13 minutes is waited out.
75
- */
76
- export declare const PROVIDER_RETRIES = 6;
77
- export declare const PROVIDER_RETRY_DELAY_MS: number;
78
- export declare const PROVIDER_RETRY_MAX_DELAY_MS: number;
79
- /** The wait before try `attempt + 1`: doubled each time, up to the longest, with a tenth either way so parallel jobs do not all come back at once. */
80
- export declare function providerRetryDelay(attempt: number, random?: () => number): number;
81
- /** How long a request to the model may go without anything coming back before the provider is said to be stalling; 0 never. */
82
- export declare const PROVIDER_STALL_MS: number;
83
- /**
84
- * How long one turn of an agent a render starts may take: past it, the turn ends where it is and
85
- * the harness goes on as after any turn - it runs the tests, and judges. The config's `turn-limit:`
86
- * sets it, in seconds, and each role's in `models:`; 0 turns it off.
87
- */
88
- export declare const DEFAULT_TURN_LIMIT_MS: number;
89
- /** How long past the turn limit what is running then - the model answering, a tool - may take to finish. */
90
- export declare const TURN_GRACE_MS: number;
91
- /** An image an agent is sent with a message. */
92
- export interface AgentImage {
93
- type: "image";
94
- data: string;
95
- mimeType: string;
96
- }
97
- /**
98
- * Refuses, before any agent of a job starts, a named model that reads no images when the job's spec links some -
99
- * rather than once the work is under way. Unnamed, the model is pi's default: `createExecutor` refuses it then.
100
- */
101
- export declare function refuseIfModelIsBlind(modelSpec: string | undefined, count: number): Promise<void>;
102
- /** A model that cannot read images, given images to read. */
103
- export declare class ModelCannotReadImagesError extends Error {
104
- }
105
- /**
106
- * Stops an agent whose model reads no images being given some: it would work blind from the spec's images. Says
107
- * which model, and what to do - a coding model that reads images, or the images described in text instead.
108
- */
109
- export declare function refuseIfBlind(model: {
110
- provider: string;
111
- id: string;
112
- input?: readonly string[];
113
- } | undefined, count: number): void;
114
- /**
115
- * What an agent opens with when its task is in its instructions. The task - the spec, how to read it, what to do
116
- * and the rules - is its system prompt, not its first message: compaction sums up the conversation and never the
117
- * system prompt, so what the agent works from stays word for word as it was, however long the work runs, and stays
118
- * in the cached prefix of every call.
119
- */
120
- export declare const BEGIN = "Begin. Your task is in your instructions.";
121
- /** How a session's work is summed up when it gets larger than the threshold: what the summary has to keep, for its role. */
122
- export interface Compaction {
123
- instructions: string;
124
- /** Tokens of conversation - past the system prompt - past which it is compacted. Default: the project's compact-at, else DEFAULT_COMPACT_AT. */
125
- atTokens?: number;
126
- }
127
- /** Tokens of conversation past which a session that keeps working is compacted, when the project does not say. */
128
- export declare const DEFAULT_COMPACT_AT = 100000;
129
- /** Have a session compacted between turns, as `compaction` says: what createExecutor does for an agent given one. */
130
- export declare function keepCompacted(session: object, compaction: Required<Compaction>): void;
131
- /**
132
- * Compact a session's work when its conversation - what it has done, not its instructions - has got larger than its
133
- * threshold. An agent that keeps its session through a job re-reads everything it did on every call: this keeps
134
- * that bounded, as pi's own compaction does only when the context window is nearly full. The summary keeps what
135
- * its role needs; its instructions are untouched. A compaction that fails leaves the session as it was.
136
- */
137
- export declare function compactIfDue(session: AgentSession): Promise<boolean>;
138
- /**
139
- * Have this session's turns timed, as an agent a render starts has: `limitMs` each - its role's in the config - or
140
- * the default.
141
- */
142
- export declare function timeTurns(session: object, limitMs?: number): void;
143
- /** How many calls to one tool may fail in a row, nothing going through, before the agent's turn is stopped. */
144
- export declare const FAILURES_BEFORE_STOP = 10;
145
- /** How many times running the very same tool call is let through before it is refused, and before the turn is stopped. */
146
- export declare const REPEATS_ALLOWED = 3;
147
- export declare const REPEATS_BEFORE_STOP = 6;
148
- /** JSON with every object's keys in order, so two ways of writing the same arguments read the same. */
149
- export declare function canonicalJson(value: unknown): string;
150
- /** How many tool calls an agent that has one thing to decide may make before it is told to decide. */
151
- export interface CallBudget {
152
- calls: number;
153
- /** The tools that hand over the decision - still let through past the budget. */
154
- finish: string[];
155
- }
156
- /**
157
- * Tools that notice an agent going round in a circle. The same call again and again with nothing in
158
- * between; or a look - read, grep, find, ls - made again with nothing changed since, however many
159
- * other looks came between: the same answer comes back. The first few go through; after that the
160
- * call is refused with what is happening, and if the agent carries on regardless its turn is
161
- * stopped - the harness goes on from there, as after any turn.
162
- *
163
- * With a budget, an agent that has one thing to decide - a verdict, a review, an account - is told
164
- * to decide once it has made that many calls: every tool but the one that hands it over refuses,
165
- * and past twice the budget its turn is stopped. Handing it over starts the count again, and forgets
166
- * the looks: a reviewer kept for the next review reads the files as they are by then.
167
- */
168
- export declare function guardRepeats(tools: ToolDefinition[], session: () => AgentSession | undefined, budget?: CallBudget): ToolDefinition[];
169
- /**
170
- * The executor. One session for the whole skill run, so a retry after a failed
171
- * gate arrives as a follow-up turn with the critique in it rather than as a cold
172
- * start that has forgotten what it just wrote.
173
- */
174
- export declare function createExecutor(opts: {
175
- cwd: string;
176
- customTools: ToolDefinition[];
177
- tools: string[];
178
- /**
179
- * "provider/model-id", with ":level" for how hard it thinks ("google/gemini-3.1-pro:high"), or
180
- * ":level" alone for pi's default model. Omitted: whatever pi is configured to use.
181
- */
182
- model?: string;
183
- /** Give it the ***plain rules - for agents that write or edit specs, not code. */
184
- rules?: boolean;
185
- /** Continue the session saved in this file, instead of starting a new one. */
186
- resumeFrom?: string;
187
- /** Save its session to disk, debug mode or not: it is picked back up later (a skill's run, resumed). */
188
- saveSession?: boolean;
189
- /** Added to its system prompt: its sandbox, above all - what it can reach (see confine.ts sandboxNote). */
190
- system?: string;
191
- /**
192
- * Its task - everything its first prompt used to say: the spec, how to read it, what to do, the rules. It goes
193
- * into its system prompt, after `system`, so compaction never sums it up; open the session with BEGIN.
194
- */
195
- task?: string;
196
- /** Given, the session keeps working through a job and is compacted between turns once its work gets larger than the threshold. */
197
- compaction?: Compaction;
198
- /**
199
- * What the agent is, e.g. "app 3 coding agent". Given, the agent is one a render started: its
200
- * whole conversation is streamed to a log named after it (see debug-log.ts).
201
- */
202
- label?: string;
203
- /** For an agent with one thing to decide: how many tool calls it has, and the tools that hand the decision over. */
204
- budget?: CallBudget;
205
- /**
206
- * Images its task refers to - the spec's linked images. Sent with its first message, and again after each
207
- * compaction, which sums them up with the rest. A model that cannot read images is refused, before any work.
208
- */
209
- images?: AgentImage[];
210
- /**
211
- * For an agent that writes and runs code: the harness's own run of the testing script, which an environment report it
212
- * makes is checked against before the pulse stops (checkAgainstScript). Only an agent given it has
213
- * report_environment_error at all.
214
- */
215
- checkEnvironment?: {
216
- run: () => Promise<{
217
- exitCode: number;
218
- output: string;
219
- }>;
220
- script: string;
221
- };
222
- /**
223
- * What the agent does: its role's model, thinking and turn limit in the config (`models:`) apply - the model over
224
- * `model`, unless the config names none for the role.
225
- */
226
- role?: AgentRole;
227
- }): Promise<AgentSession>;
228
- /** A provider request with its thinking level sent as reasoning effort, where the model takes one turri sends itself. */
229
- export declare function withReasoningEffort(payload: unknown, model: unknown, thinkingLevel: string | undefined): unknown;
230
- /**
231
- * A judge. Fresh session, one tool, and - deliberately - no access to the
232
- * executor's transcript. A judge that inherits the actor's reasoning inherits
233
- * its rationalisations, so it gets the artifact and the rubric, nothing else.
234
- */
235
- export declare function createJudge(opts: {
236
- cwd: string;
237
- verdictTool: ToolDefinition;
238
- modelSpec?: string;
239
- borrowAuthFrom: AgentSession;
240
- /** Read-only tools the rubric needs. Empty keeps the judge unable to touch anything. */
241
- extraTools?: string[];
242
- /** What it judges and by which rubric: its instructions, as an executor's task is. Open the session with BEGIN. */
243
- task?: string;
244
- }): Promise<{
245
- session: AgentSession;
246
- modelNote: string;
247
- }>;
248
- export {};