@turri-dev/cli 0.1.27-next.763d091 → 0.1.28-next.d5f2680

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 (216) hide show
  1. package/README.md +6 -6
  2. package/dist/advisor-chat.d.ts +63 -0
  3. package/dist/advisor-chat.js +290 -0
  4. package/dist/background-skills.d.ts +53 -0
  5. package/dist/background-skills.js +121 -0
  6. package/dist/bedrock-region.d.ts +66 -0
  7. package/dist/bedrock-region.js +144 -0
  8. package/dist/btw.d.ts +1 -1
  9. package/dist/btw.js +1 -1
  10. package/dist/change-plain-cli.js +20 -13
  11. package/dist/chat-idle.d.ts +7 -0
  12. package/dist/chat-idle.js +20 -0
  13. package/dist/chats.d.ts +10 -0
  14. package/dist/chats.js +23 -0
  15. package/dist/cli-options.d.ts +1 -2
  16. package/dist/cli-options.js +2 -7
  17. package/dist/cli.js +11 -3
  18. package/dist/config-command.d.ts +14 -0
  19. package/dist/config-command.js +35 -15
  20. package/dist/config-edit.d.ts +3 -3
  21. package/dist/config-edit.js +16 -12
  22. package/dist/config.d.ts +54 -34
  23. package/dist/config.js +40 -44
  24. package/dist/conform-cli.js +12 -10
  25. package/dist/conformance-switch.d.ts +34 -0
  26. package/dist/conformance-switch.js +108 -0
  27. package/dist/cultivate-cli.js +15 -5
  28. package/dist/drift-cli.js +2 -0
  29. package/dist/extension.d.ts +15 -0
  30. package/dist/extension.js +260 -83
  31. package/dist/host-session.d.ts +26 -0
  32. package/dist/host-session.js +30 -2
  33. package/dist/host.d.ts +5 -2
  34. package/dist/host.js +7 -1
  35. package/dist/init-config.d.ts +1 -1
  36. package/dist/init-config.js +20 -11
  37. package/dist/loop-cli.d.ts +3 -3
  38. package/dist/loop-cli.js +13 -16
  39. package/dist/loop-tools.js +18 -10
  40. package/dist/model-check.d.ts +8 -3
  41. package/dist/model-check.js +13 -8
  42. package/dist/new-project.js +12 -8
  43. package/dist/{validate-cli.js → parse-cli.js} +11 -5
  44. package/dist/parse-tool.d.ts +9 -0
  45. package/dist/parse-tool.js +33 -0
  46. package/dist/pi-launch.js +1 -1
  47. package/dist/plain/check.d.ts +53 -6
  48. package/dist/plain/check.js +217 -24
  49. package/dist/plain/concepts.d.ts +8 -0
  50. package/dist/plain/concepts.js +66 -23
  51. package/dist/plain/cycles.d.ts +21 -0
  52. package/dist/plain/cycles.js +190 -0
  53. package/dist/plain/errors.d.ts +4 -0
  54. package/dist/plain/errors.js +7 -0
  55. package/dist/plain/files.d.ts +18 -1
  56. package/dist/plain/files.js +39 -2
  57. package/dist/plain/graph.d.ts +33 -4
  58. package/dist/plain/graph.js +60 -12
  59. package/dist/plain/highlight.d.ts +3 -2
  60. package/dist/plain/highlight.js +4 -3
  61. package/dist/plain/index.d.ts +8 -5
  62. package/dist/plain/index.js +8 -5
  63. package/dist/plain/liquid.js +1 -6
  64. package/dist/plain/markdown.d.ts +32 -3
  65. package/dist/plain/markdown.js +146 -24
  66. package/dist/plain/module-concepts.js +2 -2
  67. package/dist/plain/parser.d.ts +83 -28
  68. package/dist/plain/parser.js +381 -260
  69. package/dist/plain/plain.tmLanguage.json +29 -3
  70. package/dist/plain/project.d.ts +48 -0
  71. package/dist/plain/project.js +155 -0
  72. package/dist/plain/spec.d.ts +90 -28
  73. package/dist/plain/spec.js +107 -133
  74. package/dist/plain/test-plain-file.d.ts +59 -0
  75. package/dist/plain/test-plain-file.js +232 -0
  76. package/dist/regenerate/activity.d.ts +20 -9
  77. package/dist/regenerate/activity.js +11 -4
  78. package/dist/regenerate/advisor-records.d.ts +93 -0
  79. package/dist/regenerate/advisor-records.js +110 -0
  80. package/dist/regenerate/advisor-runs.d.ts +87 -0
  81. package/dist/regenerate/advisor-runs.js +327 -0
  82. package/dist/regenerate/base-folder.d.ts +68 -0
  83. package/dist/regenerate/base-folder.js +168 -0
  84. package/dist/regenerate/cases.d.ts +9 -6
  85. package/dist/regenerate/cases.js +71 -15
  86. package/dist/regenerate/change-view.d.ts +8 -3
  87. package/dist/regenerate/change-view.js +71 -22
  88. package/dist/regenerate/chunk-plan.d.ts +36 -15
  89. package/dist/regenerate/chunk-plan.js +165 -59
  90. package/dist/regenerate/conform.d.ts +3 -0
  91. package/dist/regenerate/conform.js +6 -5
  92. package/dist/regenerate/conformance-agents.d.ts +18 -39
  93. package/dist/regenerate/conformance-agents.js +60 -88
  94. package/dist/regenerate/conformance.d.ts +23 -20
  95. package/dist/regenerate/conformance.js +118 -121
  96. package/dist/regenerate/diff-view.d.ts +1 -1
  97. package/dist/regenerate/diff-view.js +20 -4
  98. package/dist/regenerate/drift.d.ts +47 -15
  99. package/dist/regenerate/drift.js +101 -30
  100. package/dist/regenerate/jobs.d.ts +2 -2
  101. package/dist/regenerate/jobs.js +1 -1
  102. package/dist/regenerate/ledger.d.ts +19 -0
  103. package/dist/regenerate/loop.d.ts +61 -49
  104. package/dist/regenerate/loop.js +473 -340
  105. package/dist/regenerate/paths.d.ts +4 -0
  106. package/dist/regenerate/paths.js +7 -1
  107. package/dist/regenerate/plain-palette.js +2 -0
  108. package/dist/regenerate/prompt.d.ts +57 -19
  109. package/dist/regenerate/prompt.js +157 -122
  110. package/dist/regenerate/records.d.ts +43 -12
  111. package/dist/regenerate/records.js +102 -88
  112. package/dist/regenerate/regenerate.js +29 -11
  113. package/dist/regenerate/regression.d.ts +4 -4
  114. package/dist/regenerate/regression.js +14 -10
  115. package/dist/regenerate/renames.d.ts +42 -0
  116. package/dist/regenerate/renames.js +185 -0
  117. package/dist/regenerate/requires.d.ts +1 -1
  118. package/dist/regenerate/requires.js +10 -3
  119. package/dist/regenerate/resources.d.ts +5 -3
  120. package/dist/regenerate/resources.js +4 -4
  121. package/dist/regenerate/scripts-being-written.d.ts +19 -0
  122. package/dist/regenerate/scripts-being-written.js +30 -0
  123. package/dist/regenerate/spec-map-view.d.ts +2 -2
  124. package/dist/regenerate/spec-map-view.js +46 -15
  125. package/dist/regenerate/spec-map.d.ts +27 -5
  126. package/dist/regenerate/spec-map.js +92 -60
  127. package/dist/regenerate/spec-steps.d.ts +48 -5
  128. package/dist/regenerate/spec-steps.js +213 -28
  129. package/dist/regenerate/state.d.ts +4 -3
  130. package/dist/regenerate/stop-report.d.ts +1 -1
  131. package/dist/regenerate/stop-report.js +10 -10
  132. package/dist/regenerate/test-advisor.d.ts +101 -0
  133. package/dist/regenerate/test-advisor.js +379 -0
  134. package/dist/regenerate/test-kinds.d.ts +69 -31
  135. package/dist/regenerate/test-kinds.js +109 -80
  136. package/dist/regenerate/test-scripts.d.ts +2 -0
  137. package/dist/regenerate/test-scripts.js +4 -0
  138. package/dist/regenerate/testing-steps.d.ts +41 -0
  139. package/dist/regenerate/testing-steps.js +110 -0
  140. package/dist/regenerate/testing.d.ts +1 -1
  141. package/dist/regenerate/testing.js +5 -4
  142. package/dist/regenerate/unit-review.d.ts +1 -1
  143. package/dist/regenerate/unit-review.js +3 -3
  144. package/dist/regenerate-cli.js +11 -12
  145. package/dist/release-agent.js +4 -0
  146. package/dist/release-cli.js +2 -0
  147. package/dist/release-tools.js +2 -0
  148. package/dist/run-report.d.ts +2 -2
  149. package/dist/run-report.js +4 -3
  150. package/dist/self-invocation.d.ts +1 -1
  151. package/dist/self-invocation.js +1 -1
  152. package/dist/sentinel.js +1 -1
  153. package/dist/setup.d.ts +10 -0
  154. package/dist/setup.js +52 -4
  155. package/dist/skill.d.ts +10 -0
  156. package/dist/skill.js +6 -0
  157. package/dist/skills.js +3 -1
  158. package/dist/spec-tools.js +21 -31
  159. package/dist/test-plain-files.d.ts +41 -0
  160. package/dist/test-plain-files.js +177 -0
  161. package/docs/README.md +3 -1
  162. package/docs/authoring-plain.md +46 -13
  163. package/docs/chats.md +3 -1
  164. package/docs/config.md +20 -15
  165. package/docs/deploy.md +1 -1
  166. package/docs/development.md +2 -1
  167. package/docs/headless.md +15 -18
  168. package/docs/hosting.md +28 -12
  169. package/docs/installation.md +1 -0
  170. package/docs/parser.md +88 -27
  171. package/docs/regenerating.md +89 -54
  172. package/docs/sentinel.md +1 -1
  173. package/docs/skills-and-gates.md +3 -1
  174. package/docs/test-advisor.md +110 -0
  175. package/docs/theming.md +1 -1
  176. package/docs/using.md +17 -15
  177. package/genome/rules/bullet-continuation.md +8 -8
  178. package/genome/rules/concise-specs-examples.md +111 -80
  179. package/genome/rules/concise-specs-integration-examples.md +56 -41
  180. package/genome/rules/concise-specs.md +17 -16
  181. package/genome/rules/definitions.md +5 -5
  182. package/genome/rules/examples/integration-embedded-testing/run_conformance_tests_java.sh +1 -1
  183. package/genome/rules/func-specs.md +69 -74
  184. package/genome/rules/impl-reqs.md +4 -4
  185. package/genome/rules/integration-embedded-testing.md +20 -20
  186. package/genome/rules/integration-embedded.md +31 -31
  187. package/genome/rules/integration-standalone.md +9 -9
  188. package/genome/rules/integrations.md +18 -18
  189. package/genome/rules/linked-resources.md +19 -16
  190. package/genome/rules/module-structure.md +21 -14
  191. package/genome/rules/project-model.md +18 -17
  192. package/genome/rules/required-concepts.md +1 -1
  193. package/genome/rules/requires-modules.md +6 -5
  194. package/genome/rules/semantic-ids.md +49 -0
  195. package/genome/rules/stdlib.md +4 -5
  196. package/genome/rules/test-plain-files.md +130 -0
  197. package/genome/rules/test-reqs.md +8 -8
  198. package/genome/rules/turri-regeneration.md +24 -8
  199. package/genome/skills/analyze-2-func-specs/SKILL.md +36 -21
  200. package/genome/skills/analyze-func-specs/SKILL.md +46 -32
  201. package/genome/skills/break-down-func-spec/SKILL.md +91 -67
  202. package/genome/skills/consolidate-concepts/SKILL.md +10 -10
  203. package/genome/skills/convert-old-syntax/SKILL.md +68 -0
  204. package/genome/skills/convert-old-syntax/references/rubric.md +11 -0
  205. package/genome/skills/debug-specs/SKILL.md +62 -56
  206. package/genome/skills/implement-conformance-testing-script/SKILL.md +19 -15
  207. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +2 -2
  208. package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +2 -2
  209. package/genome/skills/implement-unit-testing-script/SKILL.md +14 -10
  210. package/genome/skills/refactor-module/SKILL.md +35 -35
  211. package/genome/skills/resolve-section-ownership/SKILL.md +9 -9
  212. package/genome/skills/resolve-spec-conflict/SKILL.md +35 -29
  213. package/package.json +7 -6
  214. package/dist/regenerate/choose-conformance.d.ts +0 -32
  215. package/dist/regenerate/choose-conformance.js +0 -117
  216. /package/dist/{validate-cli.d.ts → parse-cli.d.ts} +0 -0
@@ -0,0 +1,108 @@
1
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { join, resolve } from "node:path";
3
+ import { defineTool } from "@earendil-works/pi-coding-agent";
4
+ import { Type } from "typebox";
5
+ import { adoptLegacyConfig, CONFIG_FILE, CONFIG_KEYS, configForSpec, readConfigFile, readProjectConfig, stackConfigFileIn, stackForModule, stackOf, stacksOf } from "./config.js";
6
+ import { withSetting, writeSetting } from "./config-edit.js";
7
+ /**
8
+ * Whether a project's functional specs are conformance tested: `conformance-tests:` in its config, a stack's own over the
9
+ * project's, false when unset. Off, nothing of conformance testing runs - no conformance pulse, no conformance testing
10
+ * script, the test advisor and the chat's conform and evaluate_tests off; the test plain files there are kept, and not
11
+ * tested. The chat always knows it, and how they are turned on: the person asking for tests, or agreeing to the chat's
12
+ * offer of them, turns them on - for this session and the next, written into the config.
13
+ */
14
+ /** The chat's tools that run conformance testing: there while the tests are on. */
15
+ export const CONFORMANCE_TOOLS = ["conform", "evaluate_tests"];
16
+ /** The chat's tool that turns them on: there while they are off. */
17
+ export const TURN_ON_TOOL = "turn_on_conformance_tests";
18
+ /** Whether a module's functional specs are conformance tested: its stack's `conformance-tests:` over the project's. */
19
+ export function conformanceTestsOn(plainFile) {
20
+ try {
21
+ return configForSpec(resolve(plainFile)).conformanceTests === true;
22
+ }
23
+ catch {
24
+ return false;
25
+ }
26
+ }
27
+ /** Whether the project conformance tests anything: its own config, or a stack's - for the chat's tools, which are the project's. */
28
+ export function conformanceTestsOnIn(project) {
29
+ try {
30
+ const stacks = [stackOf(project), ...stacksOf(project)].filter((stack) => stack !== undefined);
31
+ return readProjectConfig(project).conformanceTests === true || stacks.some((stack) => readProjectConfig(project, stack).conformanceTests === true);
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ }
37
+ /**
38
+ * Turn conformance testing on: `conformance-tests: true` written where the module's value comes from - its stack's file
39
+ * when that names the key, else config.turri.yaml - and in effect at once. Says which file.
40
+ */
41
+ export function turnOnConformanceTests(project, plainFile) {
42
+ const stack = plainFile !== undefined ? stackForModule(resolve(plainFile)) : stackOf(project);
43
+ if (stack !== undefined) {
44
+ const file = join(project, stackConfigFileIn(project, stack));
45
+ if (existsSync(file) && readConfigFile(file).conformanceTests !== undefined) {
46
+ adoptLegacyConfig(project);
47
+ const own = join(project, stackConfigFileIn(project, stack));
48
+ writeFileSync(own, withSetting(readFileSync(own, "utf8"), CONFIG_KEYS.conformanceTests, true));
49
+ return stackConfigFileIn(project, stack);
50
+ }
51
+ }
52
+ writeSetting(project, CONFIG_KEYS.conformanceTests, true);
53
+ return CONFIG_FILE;
54
+ }
55
+ /**
56
+ * What the chat is told of conformance testing, every turn: what it is, whether it is on here, and - off - how it is
57
+ * turned on, and that it may offer it.
58
+ */
59
+ export function conformanceBlock(on) {
60
+ const what = "Conformance tests are black-box tests that start the built software and check it from outside, against the scenarios " +
61
+ "of a functional spec's test plain file - written by turri's agents once the code is built, and run with the whole suite " +
62
+ "each time more lands, so nothing that worked quietly breaks. Unit tests are always written with the code; conformance " +
63
+ "tests are the project's choice: `conformance-tests:` in config.turri.yaml.";
64
+ return [
65
+ "<conformance-tests>",
66
+ what,
67
+ on
68
+ ? "They are on here (conformance-tests: true): functional specs with scenarios are conformance tested, and the test advisor checks new ones in the background."
69
+ : [
70
+ "They are off here (conformance-tests: false, or unset): no scenarios are written or tested, no conformance testing script, the test",
71
+ "advisor is off, and conform and evaluate_tests are not among your tools. Test plain files already there are kept, and not tested.",
72
+ `When the person asks for conformance tests, or testing scenarios, call ${TURN_ON_TOOL} - their asking is their yes - then`,
73
+ "go on with what they asked: the test reqs, the conformance testing script, the scenarios.",
74
+ "You may offer them yourself, once and in a line, never turning them on unasked: when a functional spec could go wrong",
75
+ "silently, or the coding agent keeps failing at one - say what they would add, and ask. A yes, and you call the tool.",
76
+ "Asked how they are turned on: by asking you, or /turri-config conformance-tests true.",
77
+ ].join("\n"),
78
+ "</conformance-tests>",
79
+ ].join("\n");
80
+ }
81
+ /**
82
+ * turn_on_conformance_tests: the chat turns conformance testing on, the person having asked for it or agreed to it.
83
+ * `turnOn` is the session's (extension.ts `turnOnConformance`): the setting written, every chat's tools switched - the
84
+ * file written, from the project.
85
+ */
86
+ export function turnOnConformanceTestsTool(options) {
87
+ return defineTool({
88
+ name: TURN_ON_TOOL,
89
+ label: "Turn on conformance tests",
90
+ description: "Turn conformance tests on for this project - conformance-tests: true in its config, for this session and the next - " +
91
+ "once the person asked for conformance tests or testing scenarios, or agreed when you offered them. conform and " +
92
+ "evaluate_tests become your tools, the test advisor starts checking new functional specs, and the work loop writes " +
93
+ "and runs the conformance tests of every functional spec with scenarios once its code is built. Never call it unasked.",
94
+ promptSnippet: `${TURN_ON_TOOL}: turn conformance tests on, the person having asked for them or agreed`,
95
+ parameters: Type.Object({
96
+ plain_file: Type.Optional(Type.String({ description: "The module the tests are for: its stack's config is written when that names the key. Omitted: config.turri.yaml." })),
97
+ }),
98
+ async execute(_id, params) {
99
+ const file = options.turnOn(params.plain_file);
100
+ const text = `Conformance tests are on for this project now - conformance-tests: true, written in ${file}. Say so to the person in a line. ` +
101
+ "conform and evaluate_tests are your tools from your next turn, and the test advisor checks new functional specs. Go on " +
102
+ "with what they asked: the test reqs, the conformance testing script, the scenarios - in that order, only what is missing. " +
103
+ "Functional specs with scenarios written already, their code built, are tested once the module is next regenerated: " +
104
+ "call conform for them to have their tests written now.";
105
+ return { content: [{ type: "text", text }], details: { file } };
106
+ },
107
+ });
108
+ }
@@ -8,6 +8,7 @@ import { loadSkill } from "./skill.js";
8
8
  import { discoverSkills } from "./skills.js";
9
9
  import { PACKAGE_ROOT } from "./environment.js";
10
10
  import { c } from "./module-report.js";
11
+ import { skillModel } from "./config.js";
11
12
  const reporter = {
12
13
  step: (name, attempt) => console.log(`\n${c.bold(c.accent(`> step ${name}`))} ${c.dim(`attempt ${attempt}`)}`),
13
14
  artifact: (path, body) => {
@@ -44,17 +45,26 @@ const reporter = {
44
45
  async function main() {
45
46
  const args = process.argv.slice(2);
46
47
  const modelIndex = args.indexOf("--model");
47
- const model = modelIndex === -1 ? undefined : args[modelIndex + 1];
48
- const skillArg = args.filter((arg, i) => !arg.startsWith("--") && i !== modelIndex + 1)[0];
48
+ const modelAsked = modelIndex === -1 ? undefined : args[modelIndex + 1];
49
+ // The word after --model is the model, never the skill - and with no --model, no word is.
50
+ const skillArg = args.filter((arg, i) => !arg.startsWith("--") && (modelIndex === -1 || i !== modelIndex + 1))[0];
49
51
  if (!skillArg) {
50
52
  console.error("usage: turri cultivate <skill name | path-to-skill-dir> [--model provider/id]");
51
53
  process.exit(1);
52
54
  }
53
55
  const cwd = process.cwd();
54
56
  // A folder with a SKILL.md, or a skill by name: turri's own or the project's (skills.ts).
55
- const named = existsSync(join(skillArg, "SKILL.md")) ? undefined : discoverSkills(PACKAGE_ROOT, cwd).skills.find((found) => found.name === skillArg);
57
+ const isFolder = existsSync(join(skillArg, "SKILL.md"));
58
+ const skills = isFolder ? [] : discoverSkills(PACKAGE_ROOT, cwd).skills;
59
+ const named = skills.find((found) => found.name === skillArg);
60
+ if (!isFolder && named === undefined) {
61
+ console.error(`No skill named ${skillArg}, and no SKILL.md in a folder of that name. The skills: ${skills.map((found) => found.name).join(", ")}.`);
62
+ process.exit(1);
63
+ }
56
64
  const skillDir = named?.dir ?? skillArg;
57
65
  const skill = loadSkill(skillDir);
66
+ // A skill that names the coding model (metadata.model: coding) runs on it, harness-model on the rest; --model wins.
67
+ const model = modelAsked ?? skillModel(cwd, skill.model === "coding" ? "coding" : "harness");
58
68
  console.log(c.bold(`skill: ${skill.name}`));
59
69
  for (const line of describeGates(skill))
60
70
  console.log(` ${c.dim(line)}`);
@@ -97,7 +107,7 @@ async function main() {
97
107
  console.log(`\n${result.ok ? c.success(c.bold("run complete")) : c.error(c.bold("run aborted at a gate"))} ${c.dim(`artifacts in ${relative(cwd, skillRunDir(cwd, skill.name))}`)}`);
98
108
  process.exit(result.ok ? 0 : 1);
99
109
  }
100
- main().catch((err) => {
101
- console.error(err);
110
+ main().catch((error) => {
111
+ console.error(error instanceof Error ? error.message : error);
102
112
  process.exit(1);
103
113
  });
package/dist/drift-cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { readProjectConfig, CONFIG_FILE } from "./config.js";
2
+ import { refuseTestPlainFile } from "./test-plain-files.js";
2
3
  import { createJobRegistry } from "./regenerate/jobs.js";
3
4
  import { createWorkLoop, describeDrift } from "./regenerate/loop.js";
4
5
  const USAGE = `usage: turri drift [file.plain]
@@ -16,6 +17,7 @@ if (named === undefined) {
16
17
  process.exit(1);
17
18
  }
18
19
  try {
20
+ refuseTestPlainFile(named);
19
21
  const loop = createWorkLoop({ registry: createJobRegistry(), cwd: process.cwd(), planner: false, dryRun: true });
20
22
  console.log(describeDrift(loop.drift(named)));
21
23
  }
@@ -4,6 +4,7 @@ import { stackOnMachine } from "./stack.ts";
4
4
  import { createAskUserTool } from "./tools.ts";
5
5
  import { fromWorkingDir } from "./loop-tools.ts";
6
6
  import { type WorkLoop } from "./regenerate/loop.ts";
7
+ import { type TestAdvisor } from "./regenerate/advisor-runs.ts";
7
8
  import { type AskUser, type AskUserIO } from "./ask.ts";
8
9
  import { type TurriCore, type TurriHost } from "./chats.ts";
9
10
  /**
@@ -38,6 +39,11 @@ export type { TurriHost } from "./chats.ts";
38
39
  export declare function createTurriCore(host?: TurriHost, options?: {
39
40
  persist?: boolean;
40
41
  dialogs?: (chat: string) => AskUserIO | undefined;
42
+ /**
43
+ * Whether the session has a test advisor (docs/test-advisor.md): the terminal's chat and a host - never pi's print,
44
+ * json and rpc modes, which end when the answer is printed, nor a headless command, which builds its own loop.
45
+ */
46
+ advisor?: boolean;
41
47
  }): TurriCore;
42
48
  /** The session of this process: pi-launch.ts's, or one made as pi first builds the extension (`pi -e src/extension.ts`). */
43
49
  export declare function processSession(make?: () => TurriCore): TurriCore;
@@ -116,6 +122,15 @@ export declare function machineNeeds(cwd: string, work?: (cwd: string) => Return
116
122
  * tools' defaults.
117
123
  */
118
124
  export declare function projectConfigBlock(root: string): string;
125
+ /**
126
+ * Conformance tests turned on, for the session: `conformance-tests: true` written where the module's value comes from
127
+ * (conformance-switch.ts), and every open chat's tools switched to match - what the chat's turn_on_conformance_tests and a
128
+ * host's turnOnConformanceTests both do. `plainFile`, absolute or from the project, picks the module whose stack's file
129
+ * is written when that names the key. Returns the file written, from the project. Starts no conformance pulse.
130
+ */
131
+ export declare function turnOnConformance(core: TurriCore, plainFile?: string): string;
132
+ /** The session's test advisor, when it has one: the chat's and a host's - never pi's print, json and rpc modes'. */
133
+ export declare function sessionAdvisor(session: TurriCore): TestAdvisor | undefined;
119
134
  export { fromWorkingDir };
120
135
  /**
121
136
  * What the agent is to do with a job that just ended, unasked: what the project's guidance says to do then, or else say