@turri-dev/cli 0.2.4-next.8422d0f → 0.2.4-next.d779410

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 (175) hide show
  1. package/README.md +7 -8
  2. package/dist/bedrock-region.js +3 -3
  3. package/dist/chat-idle.d.ts +2 -2
  4. package/dist/chat-idle.js +2 -2
  5. package/dist/chat-models.d.ts +1 -1
  6. package/dist/chat-models.js +1 -1
  7. package/dist/chat-scope.d.ts +1 -3
  8. package/dist/chat-skills.d.ts +1 -1
  9. package/dist/chat-skills.js +1 -1
  10. package/dist/chats.d.ts +44 -20
  11. package/dist/chats.js +125 -64
  12. package/dist/cli.js +12 -31
  13. package/dist/config-edit.d.ts +20 -8
  14. package/dist/config-edit.js +32 -26
  15. package/dist/config.d.ts +106 -78
  16. package/dist/config.js +267 -133
  17. package/dist/conform-cli.js +14 -3
  18. package/dist/conformance-switch.d.ts +13 -22
  19. package/dist/conformance-switch.js +37 -59
  20. package/dist/drift-cli.js +1 -1
  21. package/dist/extension.d.ts +17 -10
  22. package/dist/extension.js +435 -532
  23. package/dist/genome.js +10 -49
  24. package/dist/graph.js +3 -5
  25. package/dist/host-session.d.ts +11 -21
  26. package/dist/host-session.js +6 -8
  27. package/dist/host.d.ts +4 -4
  28. package/dist/host.js +4 -7
  29. package/dist/identity.js +2 -3
  30. package/dist/init-config.d.ts +1 -2
  31. package/dist/init-config.js +10 -17
  32. package/dist/installed-providers.d.ts +1 -1
  33. package/dist/installed-providers.js +1 -1
  34. package/dist/launch-agent.d.ts +51 -0
  35. package/dist/launch-agent.js +267 -0
  36. package/dist/{release-cli.js → launch-cli.js} +41 -24
  37. package/dist/launch-session.d.ts +68 -0
  38. package/dist/launch-session.js +217 -0
  39. package/dist/launch-tools.d.ts +28 -0
  40. package/dist/launch-tools.js +69 -0
  41. package/dist/launch-track.d.ts +125 -0
  42. package/dist/launch-track.js +320 -0
  43. package/dist/loop-cli.d.ts +4 -3
  44. package/dist/loop-cli.js +17 -15
  45. package/dist/loop-tools.d.ts +45 -21
  46. package/dist/loop-tools.js +155 -90
  47. package/dist/new-project.js +2 -2
  48. package/dist/notice.d.ts +7 -6
  49. package/dist/parse-cli.js +2 -2
  50. package/dist/pi-launch.js +4 -1
  51. package/dist/pi-settings.d.ts +4 -0
  52. package/dist/pi-settings.js +39 -0
  53. package/dist/pi.js +12 -9
  54. package/dist/plain/check.d.ts +2 -9
  55. package/dist/plain/check.js +6 -39
  56. package/dist/plain-files.d.ts +2 -2
  57. package/dist/plain-files.js +7 -7
  58. package/dist/regenerate/activity.d.ts +0 -7
  59. package/dist/regenerate/activity.js +2 -20
  60. package/dist/regenerate/agent-env.d.ts +1 -1
  61. package/dist/regenerate/agent-env.js +3 -3
  62. package/dist/regenerate/agent-shell.js +5 -3
  63. package/dist/regenerate/audit.js +9 -0
  64. package/dist/regenerate/base-folder.d.ts +2 -2
  65. package/dist/regenerate/base-folder.js +1 -1
  66. package/dist/regenerate/cases.js +7 -0
  67. package/dist/regenerate/chunk-plan.d.ts +5 -0
  68. package/dist/regenerate/chunk-plan.js +16 -1
  69. package/dist/regenerate/command-check.d.ts +7 -1
  70. package/dist/regenerate/command-check.js +43 -1
  71. package/dist/regenerate/delivery.d.ts +1 -1
  72. package/dist/regenerate/delivery.js +3 -3
  73. package/dist/regenerate/drift.d.ts +4 -0
  74. package/dist/regenerate/drift.js +26 -6
  75. package/dist/regenerate/failure-reports.d.ts +28 -0
  76. package/dist/regenerate/failure-reports.js +79 -0
  77. package/dist/regenerate/job-panel.js +3 -1
  78. package/dist/regenerate/jobs-tree.js +1 -1
  79. package/dist/regenerate/jobs.d.ts +4 -2
  80. package/dist/regenerate/jobs.js +14 -10
  81. package/dist/regenerate/launch.d.ts +154 -0
  82. package/dist/regenerate/{release.js → launch.js} +195 -51
  83. package/dist/regenerate/ledger-view.d.ts +11 -24
  84. package/dist/regenerate/ledger-view.js +14 -60
  85. package/dist/regenerate/ledger.d.ts +34 -16
  86. package/dist/regenerate/ledger.js +1 -1
  87. package/dist/regenerate/lineage.d.ts +2 -0
  88. package/dist/regenerate/lineage.js +8 -0
  89. package/dist/regenerate/loop.d.ts +54 -67
  90. package/dist/regenerate/loop.js +312 -148
  91. package/dist/regenerate/model-names.d.ts +33 -0
  92. package/dist/regenerate/{engine.js → model-names.js} +2 -28
  93. package/dist/regenerate/paths.d.ts +3 -3
  94. package/dist/regenerate/paths.js +4 -4
  95. package/dist/regenerate/records.d.ts +11 -0
  96. package/dist/regenerate/records.js +15 -0
  97. package/dist/regenerate/regenerate.d.ts +0 -2
  98. package/dist/regenerate/regenerate.js +4 -15
  99. package/dist/regenerate/renames.js +4 -4
  100. package/dist/regenerate/requires.d.ts +7 -0
  101. package/dist/regenerate/requires.js +24 -18
  102. package/dist/regenerate/scripts-being-written.d.ts +4 -4
  103. package/dist/regenerate/scripts-being-written.js +3 -3
  104. package/dist/regenerate/spec-map.js +3 -3
  105. package/dist/regenerate/standing.js +1 -1
  106. package/dist/regenerate/submit-work.d.ts +2 -0
  107. package/dist/regenerate/submit-work.js +8 -3
  108. package/dist/regenerate/test-scripts.d.ts +2 -1
  109. package/dist/regenerate/test-scripts.js +33 -23
  110. package/dist/regenerate/testing-steps.d.ts +16 -5
  111. package/dist/regenerate/testing-steps.js +28 -9
  112. package/dist/regenerate-cli.js +18 -9
  113. package/dist/self-invocation.d.ts +11 -0
  114. package/dist/self-invocation.js +36 -10
  115. package/dist/sentinel-check.d.ts +3 -3
  116. package/dist/sentinel-check.js +3 -3
  117. package/dist/sentinel.d.ts +18 -12
  118. package/dist/sentinel.js +75 -46
  119. package/dist/{config-command.d.ts → settings.d.ts} +13 -8
  120. package/dist/{config-command.js → settings.js} +155 -24
  121. package/dist/setup.d.ts +2 -2
  122. package/dist/setup.js +7 -7
  123. package/dist/skill.d.ts +0 -11
  124. package/dist/skill.js +0 -9
  125. package/dist/tools.js +2 -3
  126. package/dist/turri-versions.js +2 -1
  127. package/docs/README.md +4 -6
  128. package/docs/authoring-plain.md +3 -3
  129. package/docs/chats.md +6 -9
  130. package/docs/claude-subscription.md +2 -2
  131. package/docs/config.md +61 -51
  132. package/docs/development.md +4 -5
  133. package/docs/headless.md +7 -6
  134. package/docs/hosting.md +25 -24
  135. package/docs/launch.md +67 -0
  136. package/docs/parser.md +3 -3
  137. package/docs/regenerating.md +30 -22
  138. package/docs/sandbox.md +3 -3
  139. package/docs/sentinel.md +28 -16
  140. package/docs/skills-and-gates.md +6 -11
  141. package/docs/using.md +25 -42
  142. package/genome/rules/project-model.md +2 -1
  143. package/genome/rules/test-plain-files.md +15 -7
  144. package/genome/rules/turri-regeneration.md +7 -10
  145. package/genome/skills/convert-old-syntax/SKILL.md +5 -5
  146. package/genome/skills/implement-conformance-testing-script/SKILL.md +2 -2
  147. package/genome/skills/implement-unit-testing-script/SKILL.md +3 -3
  148. package/package.json +1 -1
  149. package/dist/advisor-chat.d.ts +0 -63
  150. package/dist/advisor-chat.js +0 -290
  151. package/dist/change-plain-cli.js +0 -55
  152. package/dist/ledger-cli.d.ts +0 -1
  153. package/dist/ledger-cli.js +0 -50
  154. package/dist/ledger-tools.d.ts +0 -10
  155. package/dist/ledger-tools.js +0 -64
  156. package/dist/regenerate/advisor-records.d.ts +0 -93
  157. package/dist/regenerate/advisor-records.js +0 -110
  158. package/dist/regenerate/advisor-runs.d.ts +0 -87
  159. package/dist/regenerate/advisor-runs.js +0 -327
  160. package/dist/regenerate/engine.d.ts +0 -52
  161. package/dist/regenerate/release.d.ts +0 -121
  162. package/dist/regenerate/test-advisor.d.ts +0 -101
  163. package/dist/regenerate/test-advisor.js +0 -379
  164. package/dist/release-agent.d.ts +0 -43
  165. package/dist/release-agent.js +0 -130
  166. package/dist/release-cli.d.ts +0 -1
  167. package/dist/release-tools.d.ts +0 -44
  168. package/dist/release-tools.js +0 -170
  169. package/dist/spec-tools.d.ts +0 -36
  170. package/dist/spec-tools.js +0 -128
  171. package/dist/stacks.d.ts +0 -13
  172. package/dist/stacks.js +0 -96
  173. package/docs/deploy.md +0 -48
  174. package/docs/test-advisor.md +0 -110
  175. /package/dist/{change-plain-cli.d.ts → launch-cli.d.ts} +0 -0
package/dist/cli.js CHANGED
@@ -73,14 +73,11 @@ function chat(args) {
73
73
  }
74
74
  const COMMANDS = {
75
75
  regenerate: { module: "./regenerate-cli.ts", blurb: "regenerate a module and its chain from the spec as it is (with module:func-ids: regenerate those again)" },
76
- glimpse: { module: "./regenerate-cli.ts", blurb: "plan the work and print the first job's prompt, starting nothing", args: ["--dry-run"] },
77
76
  drift: { module: "./drift-cli.ts", blurb: "what is left to regenerate: how far the code has drifted from its spec" },
78
77
  conform: { module: "./conform-cli.ts", blurb: "write and run a module's conformance tests" },
79
- "change-plain": { module: "./change-plain-cli.ts", blurb: "apply a change to ***plain, given as a git diff, and regenerate it" },
80
78
  parse: { module: "./parse-cli.ts", blurb: "parse ***plain - its syntax and structure, never its code or tests - regenerating nothing" },
81
79
  lineage: { module: "./lineage-cli.ts", blurb: "a module's lineage: what was regenerated into it, and when" },
82
- ledger: { module: "./ledger-cli.ts", blurb: "what turri did here: the last runs and their pulses, or one pulse, from the ledger" },
83
- release: { module: "./release-cli.ts", blurb: "release what is regenerated to dist/<module> and activate it on this machine" },
80
+ launch: { module: "./launch-cli.ts", blurb: "launch what is regenerated from dist/<module> on this machine" },
84
81
  cultivate: { module: "./cultivate-cli.ts", blurb: "run a gated skill" },
85
82
  };
86
83
  /** Getting the machine ready, and checking it is. */
@@ -112,8 +109,7 @@ const USAGE = [
112
109
  " turri <command> [args]",
113
110
  " turri --version turri's version, and pi's",
114
111
  "",
115
- ` ${"options".padEnd(12)} --harness-model <m> the model you chat with --coding-model <m> the model renders run on`,
116
- ` ${"".padEnd(12)} --stack <name> build with config.turri.<name>.yaml over config.turri.yaml - here and in every command`,
112
+ ` ${"options".padEnd(12)} --harness-model <m> the model you chat with --coding-model <m> the model that writes the code`,
117
113
  ` ${"".padEnd(12)} --debug keep what turri writes for debugging it - agents' logs and sessions - as debug: true does`,
118
114
  ` ${"".padEnd(12)} --use-theme <t> another theme than turri-dark - and every option of pi's own`,
119
115
  "",
@@ -128,37 +124,22 @@ const USAGE = [
128
124
  "specification, so that linked resources inside it resolve the way the parser expects.",
129
125
  ].join("\n");
130
126
  dropNoise();
131
- // --stack <name>, for any command and for the conversation: the stack everything is built with (stacks.ts), taken out
132
- // before the rest is read - a command never sees it. --debug too: TURRI_DEBUG for this run, and the pi it starts.
133
- const argv = await withoutStack(process.argv.slice(2));
127
+ // --debug, for any command and for the conversation: TURRI_DEBUG for this run, and the pi it starts - taken out before
128
+ // the rest is read, so a command never sees it.
129
+ const argv = withoutDebug(process.argv.slice(2));
134
130
  const [command, ...rest] = argv;
135
- async function withoutStack(args) {
131
+ function withoutDebug(args) {
136
132
  const kept = [];
137
- let stack;
138
- for (let at = 0; at < args.length; at += 1) {
139
- const arg = args[at];
140
- if (arg === "--stack")
141
- stack = args[++at] ?? "";
142
- else if (arg.startsWith("--stack="))
143
- stack = arg.slice("--stack=".length);
144
- else if (arg === "--debug")
133
+ for (const arg of args) {
134
+ if (arg === "--debug")
145
135
  process.env.TURRI_DEBUG = "1";
146
136
  else
147
137
  kept.push(arg);
148
138
  }
149
- if (stack === undefined)
150
- return kept;
151
- const { switchStack } = await import("./stacks.js");
152
- try {
153
- switchStack(process.cwd(), stack);
154
- }
155
- catch (error) {
156
- console.error(error instanceof Error ? error.message : String(error));
157
- process.exit(1);
158
- }
159
139
  return kept;
160
140
  }
161
- if (command === "-h" || command === "--help") {
141
+ // `turri help` too: the word people type first, which would otherwise be an unknown command.
142
+ if (command === "-h" || command === "--help" || command === "help") {
162
143
  console.log(USAGE);
163
144
  process.exit(0);
164
145
  }
@@ -172,7 +153,7 @@ if (command === "-v" || command === "--version") {
172
153
  // The AWS region the project's Bedrock models need, set before any model is called - here, and in the pi the chat starts,
173
154
  // which inherits it - unless the person set one (bedrock-region.ts). The models named on the command line count too. A
174
155
  // command that calls no model is left alone.
175
- if (!["parse", "drift", "lineage", "ledger", "init-config", ...Object.keys(PACKAGE_COMMANDS)].includes(command ?? "")) {
156
+ if (!["parse", "drift", "lineage", "init-config", ...Object.keys(PACKAGE_COMMANDS)].includes(command ?? "")) {
176
157
  const { applyBedrockRegion } = await import("./bedrock-region.js");
177
158
  const named = argv.flatMap((arg, at) => ["--harness-model", "--coding-model", "--model"].includes(arg) ? [argv[at + 1] ?? ""] : arg.startsWith("--harness-model=") || arg.startsWith("--coding-model=") || arg.startsWith("--model=") ? [arg.slice(arg.indexOf("=") + 1)] : []);
178
159
  applyBedrockRegion(process.cwd(), { also: named.filter((model) => model !== "") });
@@ -215,7 +196,7 @@ process.argv = [
215
196
  // A headless run is stopped by a signal - SIGTERM, SIGHUP, Ctrl-C - whatever else listens for it: it exits, and what
216
197
  // its agents left running goes with it (shell.ts kills every process group on exit). Left to the libraries' own
217
198
  // handlers, one ran on for minutes after it was told to stop, building in the same codebase as the run after it.
218
- if (!["parse", "drift", "lineage", "ledger"].includes(command)) {
199
+ if (!["parse", "drift", "lineage"].includes(command)) {
219
200
  for (const [signal, code] of [["SIGTERM", 143], ["SIGHUP", 129], ["SIGINT", 130]]) {
220
201
  process.on(signal, () => {
221
202
  console.error(`\nstopped (${signal})`);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `/turri-config`'s side of config.turri.yaml: every setting turri reads, what it takes - a yes or no, one of a few words, a
2
+ * `/settings`' and the chat's settings tool's side of config.turri.yaml: every setting turri reads, what it takes - a yes or no, one of a few words, a
3
3
  * number, a model, a list - and when a change to it takes effect, so the person knows whether to wait for the next
4
4
  * pulse or not at all. A change is written into the file line by line, its comments and the commented-out examples
5
5
  * kept; `models:` and `agent-env:`, which nest, are written again whole, their own comments lost.
@@ -20,14 +20,20 @@ export interface Setting {
20
20
  options?: string[];
21
21
  /** The least a number may be. */
22
22
  min?: number;
23
- /** Set in the project's config.turri.yaml only: a stack's file does not change it. */
23
+ /** Set in the project's config.turri.yaml only: a module's config.turri.<module>.yaml does not change it. */
24
24
  projectOnly?: boolean;
25
+ /**
26
+ * Changed by the person alone, with /settings: the chat's settings tool refuses it. What it decides is theirs - turning
27
+ * conformance tests on doubles each change - or it widens what the agents reach (credentials, folders past the
28
+ * sandbox), or it is a check on the chat's own work (the sentinel, the ***plain rules, the ledger).
29
+ */
30
+ personOnly?: boolean;
25
31
  }
26
32
  /** What each effect is, said to the person. */
27
33
  export declare const EFFECT_TEXT: Record<Effect, string>;
28
34
  /** Every setting, in the order the list shows them. */
29
35
  export declare function settings(rules?: string[]): Setting[];
30
- /** Every setting, as a host is given them: rules-off offering turri's own rules, as /turri-config offers them. */
36
+ /** Every setting, as a host is given them: rules-off offering turri's own rules, as /settings offers them. */
31
37
  export declare function configSettings(): Setting[];
32
38
  /** A setting by its key - `review`, `models.coding` - or nothing. */
33
39
  export declare function settingOf(key: string, rules?: string[]): Setting | undefined;
@@ -58,13 +64,19 @@ export declare function currentValue(text: string, key: string): unknown;
58
64
  export declare function shownValue(value: unknown): string;
59
65
  /** The project's config.turri.yaml - or the config.yaml it is read from until it has one - its text, empty when there is neither. */
60
66
  export declare function readConfigText(dir: string): string;
61
- /** What a change does beside setting the value: the files and settings that win over it, said to the person. */
62
- export declare function overriddenBy(dir: string, text: string, setting: Setting): string[];
63
67
  /**
64
- * Write a setting into the project's config.turri.yaml - made when it is not there, from config.yaml and each stack's
65
- * file in the old naming when they are what the project is read from - and give back the file as written.
68
+ * What a change does beside setting the value: the files and settings that win over it, said to the person. `module`:
69
+ * written into that module's own file - the project's file is the one it wins over, and nothing over it is said.
66
70
  */
67
- export declare function writeSetting(dir: string, key: string, value: unknown): string;
71
+ export declare function overriddenBy(dir: string, text: string, setting: Setting, module?: string): string[];
72
+ /**
73
+ * Write a setting into the project's config.turri.yaml - or, with `module`, that module's config.turri.<module>.yaml -
74
+ * made when it is not there, from config.yaml and each module's file in the old naming when they are what the project
75
+ * is read from - and give back the file as written.
76
+ */
77
+ export declare function writeSetting(dir: string, key: string, value: unknown, module?: string): string;
78
+ /** A module's own config.turri.<module>.yaml - or the config.<module>.yaml it is read from until the project has turri's files - its text, empty when there is none. */
79
+ export declare function readModuleConfigText(dir: string, module: string): string;
68
80
  /** The files a path setting is offered: the testing scripts in the root and test_scripts/, the .plain files of the folder, or - the test folder - its folders. */
69
81
  export declare function pathOptions(dir: string, key: string): string[];
70
82
  /** The dotenv files of the project root, for agent-env.files. */
@@ -3,7 +3,7 @@ import { join } from "node:path";
3
3
  import { dump as dumpYaml, load as loadYaml } from "js-yaml";
4
4
  import { PACKAGE_ROOT } from "./environment.js";
5
5
  import { loadRules } from "./rules.js";
6
- import { adoptLegacyConfig, AGENT_ROLES, CONFIG_FILE, chosenStack, projectConfigFile, stackConfigFileIn, stacksOf, splitModelSpec, THINKING_LEVELS } from "./config.js";
6
+ import { adoptLegacyConfig, AGENT_ROLES, CONFIG_FILE, moduleConfigFile, moduleConfigFileIn, moduleConfigsOf, projectConfigFile, splitModelSpec, THINKING_LEVELS } from "./config.js";
7
7
  /** What each effect is, said to the person. */
8
8
  export const EFFECT_TEXT = {
9
9
  now: "in effect now",
@@ -20,10 +20,10 @@ const SECONDS = ["0", "60", "120", "180", "300"];
20
20
  const ROLE_ABOUT = {
21
21
  default: "every role not named",
22
22
  chat: "the conversation - as harness-model, which it wins over",
23
- sentinel: "the sentinel: checks every finished pulse and tests the release",
23
+ sentinel: "the sentinel: checks every finished pulse and tests what is launched",
24
24
  planner: "cuts the work into pulses",
25
25
  diagnosis: "looks into a pulse that failed for good",
26
- release: "the release agent",
26
+ launch: "the launch agent",
27
27
  coding: "writes the code - as coding-model, which it wins over",
28
28
  conformance: "writes the conformance tests",
29
29
  explorer: "explores the code for a conformance run",
@@ -32,7 +32,6 @@ const ROLE_ABOUT = {
32
32
  judge: "judges a failing conformance run - as judge-model, which it wins over",
33
33
  arbiter: "weighs a second review",
34
34
  debugger: "a fresh look at unit tests that keep failing the same way",
35
- advisor: "the test advisor: whether a new or changed functional spec needs scenarios",
36
35
  };
37
36
  /** Every setting, in the order the list shows them. */
38
37
  export function settings(rules = []) {
@@ -63,10 +62,9 @@ export function settings(rules = []) {
63
62
  { key: "review", about: "whether the code and its tests are reviewed once they pass", kind: "boolean", unset: "true", effect: "next-pulse" },
64
63
  { key: "mutation-testing", about: "whether the coding agent and the reviewer can put a bug in the code for one test run (can_it_fail)", kind: "boolean", unset: "true", effect: "next-pulse" },
65
64
  { key: "allow-to-stop-jobs", about: "whether turri stops a running pulse the ***plain has moved on from", kind: "boolean", unset: "true", effect: "now" },
66
- { key: "release-after-pulse", about: "whether every pulse that lands code releases it", kind: "boolean", unset: "false", effect: "next-landing" },
67
- { key: "sentinel", about: "whether a chat of its own checks every finished pulse, tests the release, and tells you what is wrong - ask: you are asked before it first opens", kind: "choice", options: ["ask", "true", "false"], unset: "ask", effect: "next-landing" },
68
- { key: "test-advisor", about: "whether turri checks each new or changed functional spec with no scenarios in the background, to see whether it needs scenarios - on a yes, the chat writes them", kind: "boolean", unset: "true", effect: "now" },
69
- { key: "conformance-tests", about: "whether functional specs' scenarios are written and conformance tested - false: none, the test advisor and conform off", kind: "boolean", unset: "false", effect: "now" },
65
+ { key: "launch-after-pulse", about: "whether every pulse that lands code is launched, in the background", kind: "boolean", unset: "false", effect: "next-landing" },
66
+ { key: "sentinel", about: "whether a chat of its own checks every finished pulse, tests what is launched, and tells you what is wrong - ask: you are asked before it first opens", kind: "choice", options: ["ask", "true", "false"], unset: "ask", effect: "next-landing", personOnly: true },
67
+ { key: "conformance-tests", about: "whether functional specs' scenarios are written and conformance tested - false: none, and the chat's conform refused", kind: "boolean", unset: "false", effect: "now", personOnly: true },
70
68
  { key: "test-dir", about: "the folder of the test plain files, a folder per module in it, by path from the project root", kind: "path", unset: "tests", effect: "now" },
71
69
  { key: "base-folder", about: "a folder a codebase that requires no other module starts from, by path from the project root - code to build on, files to use, copied in once", kind: "path", unset: "none: it starts empty", effect: "next-pulse" },
72
70
  { key: "unittests-script", about: "the unit testing script, by path from the project root", kind: "path", unset: "the one run_unittests*.sh found", effect: "next-test-run" },
@@ -78,17 +76,17 @@ export function settings(rules = []) {
78
76
  { key: "max-lines-per-pulse", about: "the most lines of ***plain in one pulse before a group is split", kind: "number", options: ["60", "120", "200", "300"], min: 1, unset: "120", effect: "next-plan" },
79
77
  { key: "turn-limit", about: "seconds each agent turn has, for every role without its own - 0 for none", kind: "number", options: SECONDS, min: 0, unset: "120", effect: "next-pulse" },
80
78
  { key: "compact-at", about: "tokens of work an agent holds before it is compacted between turns", kind: "number", options: ["50000", "100000", "150000", "200000"], min: 1000, unset: "100000", effect: "next-pulse", projectOnly: true },
81
- { key: "rules-off", about: "***plain rules left out of the prompts of the agents that write ***plain", kind: "list", options: rules, unset: "none", effect: "next-message", projectOnly: true },
82
- { key: "agent-env.files", about: "dotenv files whose variables the agents' commands get", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true },
83
- { key: "agent-env.vars", about: "variables from turri's environment the agents' commands get, by name", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true },
84
- { key: "toolchains", about: "folders of this machine an agent's commands may read beside the usual ones", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true },
79
+ { key: "rules-off", about: "***plain rules left out of the prompts of the agents that write ***plain", kind: "list", options: rules, unset: "none", effect: "next-message", projectOnly: true, personOnly: true },
80
+ { key: "agent-env.files", about: "dotenv files whose variables the agents' commands get", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true, personOnly: true },
81
+ { key: "agent-env.vars", about: "variables from turri's environment the agents' commands get, by name", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true, personOnly: true },
82
+ { key: "toolchains", about: "folders of this machine an agent's commands may read beside the usual ones", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true, personOnly: true },
85
83
  { key: "debug", about: "whether turri keeps what it writes for debugging it - agents' logs and sessions, pulse logs, outputs", kind: "boolean", unset: "false", effect: "next-pulse", projectOnly: true },
86
84
  { key: "cache-keep", about: "megabytes of package caches the project keeps; 0 keeps none", kind: "number", options: ["0", "1024", "4096", "16384"], min: 0, unset: "4096", effect: "next-start", projectOnly: true },
87
- { key: "ledger-keep", about: "megabytes of the ledger - what turri did, as facts - the project keeps; 0 keeps none", kind: "number", options: ["0", "50", "100", "500"], min: 0, unset: "100", effect: "next-start", projectOnly: true },
85
+ { key: "ledger-keep", about: "megabytes of the ledger - what turri did, as facts - the project keeps; 0 keeps none", kind: "number", options: ["0", "50", "100", "500"], min: 0, unset: "100", effect: "next-start", projectOnly: true, personOnly: true },
88
86
  ...roles,
89
87
  ];
90
88
  }
91
- /** Every setting, as a host is given them: rules-off offering turri's own rules, as /turri-config offers them. */
89
+ /** Every setting, as a host is given them: rules-off offering turri's own rules, as /settings offers them. */
92
90
  export function configSettings() {
93
91
  return settings(loadRules(join(PACKAGE_ROOT, "genome", "rules")).map((rule) => rule.name));
94
92
  }
@@ -309,21 +307,24 @@ export function readConfigText(dir) {
309
307
  const path = join(dir, projectConfigFile(dir));
310
308
  return existsSync(path) ? readFileSync(path, "utf8") : "";
311
309
  }
312
- /** What a change does beside setting the value: the files and settings that win over it, said to the person. */
313
- export function overriddenBy(dir, text, setting) {
310
+ /**
311
+ * What a change does beside setting the value: the files and settings that win over it, said to the person. `module`:
312
+ * written into that module's own file - the project's file is the one it wins over, and nothing over it is said.
313
+ */
314
+ export function overriddenBy(dir, text, setting, module) {
314
315
  const notes = [];
315
316
  const wins = { "harness-model": "models.chat", "coding-model": "models.coding", "judge-model": "models.judge" };
316
317
  const over = wins[setting.key];
317
318
  if (over !== undefined && currentValue(text, over) !== undefined)
318
- notes.push(`${over} is set too, and wins over ${setting.key} - change it with /turri-config ${over}.`);
319
- if (setting.projectOnly === true)
319
+ notes.push(`${over} is set too, and wins over ${setting.key} - change it with /settings ${over}.`);
320
+ if (setting.projectOnly === true || module !== undefined)
320
321
  return notes;
321
322
  const top = setting.key.split(".")[0];
322
- for (const stack of stacksOf(dir)) {
323
- const file = stackConfigFileIn(dir, stack);
323
+ for (const each of moduleConfigsOf(dir)) {
324
+ const file = moduleConfigFileIn(dir, each);
324
325
  const own = loadMapping(safeRead(join(dir, file)))[top];
325
326
  if (own !== undefined)
326
- notes.push(`${file} sets ${top} too, and wins while the stack ${stack} is chosen${chosenStack() === stack ? " - as it is now" : ""}.`);
327
+ notes.push(`${file} sets ${top} too, and wins for ${each}.plain and the modules built on it.`);
327
328
  }
328
329
  return notes;
329
330
  }
@@ -336,15 +337,20 @@ function safeRead(path) {
336
337
  }
337
338
  }
338
339
  /**
339
- * Write a setting into the project's config.turri.yaml - made when it is not there, from config.yaml and each stack's
340
- * file in the old naming when they are what the project is read from - and give back the file as written.
340
+ * Write a setting into the project's config.turri.yaml - or, with `module`, that module's config.turri.<module>.yaml -
341
+ * made when it is not there, from config.yaml and each module's file in the old naming when they are what the project
342
+ * is read from - and give back the file as written.
341
343
  */
342
- export function writeSetting(dir, key, value) {
344
+ export function writeSetting(dir, key, value, module) {
343
345
  adoptLegacyConfig(dir);
344
- const text = withSetting(readConfigText(dir), key, value);
345
- writeFileSync(join(dir, CONFIG_FILE), text);
346
+ const text = withSetting(module !== undefined ? safeRead(join(dir, moduleConfigFile(module))) : readConfigText(dir), key, value);
347
+ writeFileSync(join(dir, module !== undefined ? moduleConfigFile(module) : CONFIG_FILE), text);
346
348
  return text;
347
349
  }
350
+ /** A module's own config.turri.<module>.yaml - or the config.<module>.yaml it is read from until the project has turri's files - its text, empty when there is none. */
351
+ export function readModuleConfigText(dir, module) {
352
+ return safeRead(join(dir, moduleConfigFileIn(dir, module)));
353
+ }
348
354
  /** The files a path setting is offered: the testing scripts in the root and test_scripts/, the .plain files of the folder, or - the test folder - its folders. */
349
355
  export function pathOptions(dir, key) {
350
356
  const list = (folder, test) => {
package/dist/config.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * ```yaml
7
7
  * module: prism_cli.plain # what `turri regenerate` builds by default
8
- * conformance-tests: false # whether scenarios are written and conformance tested - false: none, the test advisor off (default: false)
8
+ * conformance-tests: false # whether scenarios are written and conformance tested - false: none (default: false)
9
9
  * test-dir: tests # where the test plain files are, a folder per module: tests/<module>/ (default: tests)
10
10
  * base-folder: existing-app # a codebase that requires none starts as a copy of it - code to build on, assets to use
11
11
  * harness-model: # the model you chat with in `turri`
@@ -19,9 +19,8 @@
19
19
  * review: false # review the code and its tests once they pass (default: true)
20
20
  * mutation-testing: false # give the coding agent and the reviewer can_it_fail (default: true)
21
21
  * allow-to-stop-jobs: false # stop a running job the spec moved on from (default: true)
22
- * release-after-pulse: true # release what each pulse lands, as its last stage, before the next pulse (default: false)
23
- * test-advisor: false # check each new or changed functional spec with no scenarios for whether it needs them - on a yes, the chat writes them (default: true)
24
- * sentinel: true # a chat of its own every finished pulse goes to, which tests the release and tells you what is wrong: true, false, or ask - the person asked before it first opens in a session (default: ask)
22
+ * launch-after-pulse: true # launch what each pulse lands, in the background, the newest commit winning (default: false)
23
+ * sentinel: true # a chat of its own every finished pulse goes to, which tests what is launched and tells you what is wrong: true, false, or ask - the person asked before it first opens in a session (default: ask)
25
24
  * rules-off: [integrations] # ***plain rules to leave out of the prompts, by name (default: none)
26
25
  * unittests-script: test_scripts/run_unittests.sh # the testing scripts - see test-scripts.ts
27
26
  * conformance-tests-script: test_scripts/run_conformance_tests.sh
@@ -44,79 +43,93 @@
44
43
  * either of which may be left out; a bare string is the model alone. What a model leaves out it takes
45
44
  * from the one it inherits: judge-model from coding-model, coding-model from harness-model. They are
46
45
  * defaults: `--harness-model` / `--coding-model` / `--judge-model` on the command line win over them,
47
- * and so does a model chosen during the conversation (pi's /model, engine). `model:` is read
46
+ * and so does a model chosen during the conversation (pi's /model) or named on a call. `model:` is read
48
47
  * as `coding-model`, which it was before there were two.
49
48
  *
50
49
  * Keys are written with dashes; underscores are read the same (`conformance_tests`). Keys it
51
50
  * does not know - another tool's `config.yaml`, read while it is the old file, may carry several - are ignored, and so is a value of
52
51
  * the wrong type. Everything is optional, and what is given on the command line wins.
53
52
  *
54
- * A project whose parts do not share a stack - a Python backend and a React frontend beside each other - keeps a
55
- * stack's own settings in `config.turri.<stack>.yaml` beside `config.turri.yaml`: `config.turri.backend.yaml` for the
56
- * stack `backend` - its testing scripts, its toolchains. A stack is chosen, never worked out: `/stack` in the chat,
57
- * `--stack <name>` (or `TURRI_STACK`) on the command line. With one chosen, everything turri builds from then on is
58
- * built with `config.turri.yaml` and the stack's file over it, key by key - a model it names takes what it leaves out
59
- * from the project's - and a pulse already running keeps the stack it started with. With none, `config.turri.yaml`
60
- * alone. `module:` and `harness-model:` are the project's alone - there is one conversation - and are not read from a
61
- * stack's file.
53
+ * A module can have settings of its own in `config.turri.<module>.yaml` beside `config.turri.yaml`:
54
+ * `config.turri.backend.yaml` for `backend.plain` - its testing scripts, its toolchains, its models - laid over
55
+ * `config.turri.yaml` key by key, a model it names taking what it leaves out from the project's. A module with no file
56
+ * of its own takes the one of a module it requires - `config.turri.backend.yaml` builds `backend_auth.plain`, which
57
+ * requires `backend.plain` - and two among the modules it requires is an error (`configModuleFor`). Nobody chooses it:
58
+ * it is worked out from the module, and a pulse keeps the one it started with. `module:`, `harness-model:` and the
59
+ * other settings of the whole project are read from `config.turri.yaml` alone.
62
60
  */
63
61
  /** turri's settings for a project, in a file of its own: a `config.yaml` beside it may be another tool's. */
64
62
  export declare const CONFIG_FILE = "config.turri.yaml";
65
63
  /**
66
64
  * Where turri's settings were before they had a file of their own. A project with no `config.turri*.yaml` yet is read
67
- * from it - and a `config.<name>.yaml` beside it as the stack `<name>` - and turri never writes it: the first setting
65
+ * from it - and a `config.<name>.yaml` beside it as the module `<name>`'s - and turri never writes it: the first setting
68
66
  * turri writes copies them to the new names (`adoptLegacyConfig`), and from then on the old files are not read.
69
67
  */
70
68
  export declare const LEGACY_CONFIG_FILE = "config.yaml";
71
- /** A stack's config file's name: `config.turri.backend.yaml` for the stack `backend`. */
72
- export declare function stackConfigFile(stack: string): string;
73
- /** Whether a folder's settings are still in the old files: a config.yaml or a config.<stack>.yaml, and no config.turri*.yaml. */
69
+ /** A module's config file's name: `config.turri.backend.yaml` for `backend.plain`. */
70
+ export declare function moduleConfigFile(module: string): string;
71
+ /** Whether a folder's settings are still in the old files: a config.yaml or a config.<module>.yaml, and no config.turri*.yaml. */
74
72
  export declare function usesLegacyConfig(root: string): boolean;
75
73
  /** The file the project's settings are read from, by name: config.turri.yaml, or config.yaml while the folder has only the old files. */
76
74
  export declare function projectConfigFile(root: string): string;
77
- /** The file a stack's settings are read from, by name - the old name while the folder has only the old files. */
78
- export declare function stackConfigFileIn(root: string, stack: string): string;
79
- /** Whether a folder holds a project's settings: a config.turri.yaml, a stack's file, or the old files. */
75
+ /** The file a module's own settings are read from, by name - the old name while the folder has only the old files. */
76
+ export declare function moduleConfigFileIn(root: string, module: string): string;
77
+ /** Whether a folder holds a project's settings: a config.turri.yaml, a module's file, or the old files. */
80
78
  export declare function hasProjectConfig(root: string): boolean;
81
- /** The stacks a project folder has files for, by name. */
82
- export declare function stacksOf(root: string): string[];
79
+ /** The modules a project folder has config files for, by name. */
80
+ export declare function moduleConfigsOf(root: string): string[];
83
81
  /**
84
82
  * Before turri first writes a setting in a folder whose settings are still in the old files: config.yaml copied to
85
- * config.turri.yaml, and each config.<stack>.yaml to config.turri.<stack>.yaml, so nothing is lost when the old files
83
+ * config.turri.yaml, and each config.<module>.yaml to config.turri.<module>.yaml, so nothing is lost when the old files
86
84
  * stop being read. The old files are left as they are. Gives back the files written, by name.
87
85
  */
88
- export declare function adoptLegacyConfig(root: string, options?: {
89
- projectFile?: boolean;
90
- }): string[];
91
86
  /**
92
- * The stack chosen now - the chat's own (`/stack` in it), else `--stack` or `TURRI_STACK` - or, inside a pulse, the one
93
- * it started with.
87
+ * Keys turri has renamed, old to new - no alias: a project's config.turri.yaml or config.turri.<module>.yaml that still has
88
+ * the old one has it renamed as turri first reads or writes the project's config (`renameOldKeys`), its value and its
89
+ * comment kept. One that sets the new one too is left as it is, the old one said in the banner as doing nothing.
94
90
  */
95
- export declare function chosenStack(): string | undefined;
91
+ export declare const RENAMED_KEYS: Readonly<Record<string, string>>;
92
+ /** A key renamed in a config file. */
93
+ export interface RenamedKey {
94
+ file: string;
95
+ from: string;
96
+ to: string;
97
+ }
96
98
  /**
97
- * Choose the stack everything is built with from now on - or none, the project's config alone. In a chat, for that
98
- * chat alone; outside one, kept in TURRI_STACK.
99
+ * Rename the old keys of `RENAMED_KEYS` in the project's config.turri*.yaml files - once a process, or again with `again`
100
+ * (a file just copied from its old name). A top-level key alone, its line kept but for the key's name; a file that also
101
+ * sets the new key, one that does not parse, or one that cannot be written is left as it is. Returns every key renamed
102
+ * in the project this process.
99
103
  */
100
- export declare function chooseStack(stack: string | undefined): void;
101
- /** Run `work` with `stack` as the one chosen, whatever is chosen meanwhile: a pulse keeps the stack it started with. */
102
- export declare function withStack<T>(stack: string | undefined, work: () => T): T;
103
- /** Whether a stack is pinned here - named by the call that asked for the work, or kept by the pulse it runs in. */
104
- export declare function stackPinned(): boolean;
104
+ export declare function renameOldKeys(root: string, options?: {
105
+ again?: boolean;
106
+ }): RenamedKey[];
107
+ export declare function adoptLegacyConfig(root: string, options?: {
108
+ projectFile?: boolean;
109
+ }): string[];
110
+ /** Inside a pulse - or work pinned like one - the module whose config file it runs with; none outside. */
111
+ export declare function pinnedConfigModule(): string | undefined;
112
+ /** Run `work` with `module`'s config file over the project's, whatever the files say meanwhile: a pulse keeps the one it started with. */
113
+ export declare function withConfigModule<T>(module: string | undefined, work: () => T): T;
114
+ /** Whether a module's config file is pinned here - by the pulse it runs in, or the work that plans it. */
115
+ export declare function configModulePinned(): boolean;
105
116
  /**
106
- * The stack a module is built with: the one pinned - named by the call, or kept by the pulse - else the stack named
107
- * after the module, config.turri.backend.yaml for backend.plain, else the one chosen for the session; none, when none
108
- * of them is.
117
+ * The module whose config file builds a module - its `config.turri.<module>.yaml` laid over `config.turri.yaml` - or
118
+ * none, `config.turri.yaml` alone. The one pinned, inside a pulse; else the module's own file; else the one file among
119
+ * the modules it requires, all the way down - a module is built on their code, in one codebase, with their testing
120
+ * scripts. Two among them is an error: which one builds it cannot be told. Only `requires` counts, not imports.
109
121
  */
110
- export declare function stackForModule(plainFile: string): string | undefined;
111
- /** The words that choose no stack: the project's config alone. */
112
- export declare const NO_STACK: string[];
122
+ export declare function configModuleFor(plainFile: string): string | undefined;
123
+ /** Why a module's config cannot be told: two or more of the modules it requires have a config file of their own. */
124
+ export declare function moduleConfigClash(module: string, below: string[], root: string): string;
113
125
  /**
114
- * The stack `name` names for the project at `root` - undefined for none - refused when the project has no file for
115
- * it, with the stacks it has.
126
+ * Every module a module requires, all the way down, by name - read from each file's frontmatter alone, found as the
127
+ * parser finds them (the module's folder, its template/ folder, PLAIN_TEMPLATE_DIRS). One that is not there, or does
128
+ * not read, ends its branch: the parse says what is wrong with it.
116
129
  */
117
- export declare function stackNamed(root: string, name: string): string | undefined;
118
- /** The stack a project folder is built with now: the one chosen, when the folder has a file for it. */
119
- export declare function stackOf(root: string): string | undefined;
130
+ export declare function requiredModulesOf(plainFile: string): string[];
131
+ /** The module whose config file is pinned here, when the project folder has that file. */
132
+ export declare function configModuleOf(root: string): string | undefined;
120
133
  export declare const THINKING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
121
134
  export type ThinkingLevel = (typeof THINKING_LEVELS)[number];
122
135
  /** A model, and how hard it thinks - either may be left to the one it inherits from. */
@@ -128,14 +141,13 @@ export interface ModelChoice {
128
141
  /**
129
142
  * The agents turri starts, by what they do - each can be given its own model, thinking and turn limit (`models:`).
130
143
  * The code fixer of a conformance run and the repair agent are coding agents; the unit-test and conformance arbiters
131
- * are both `arbiter`. The test advisor's calls - classifying a functional spec, its probes, its readers, its verifier -
132
- * are `advisor`.
144
+ * are both `arbiter`.
133
145
  */
134
- export declare const AGENT_ROLES: readonly ["chat", "sentinel", "planner", "diagnosis", "release", "coding", "conformance", "explorer", "reviewer", "test-reviewer", "judge", "arbiter", "debugger", "advisor"];
146
+ export declare const AGENT_ROLES: readonly ["chat", "sentinel", "planner", "diagnosis", "launch", "coding", "conformance", "explorer", "reviewer", "test-reviewer", "judge", "arbiter", "debugger"];
135
147
  export type AgentRole = (typeof AGENT_ROLES)[number];
136
148
  /**
137
149
  * How hard each role thinks when nothing names a level - not the config's `models:`, nor a `:level` on the model it is
138
- * given. The agents that do the work - write the code and the tests, explore, release - think little: they work from a
150
+ * given. The agents that do the work - write the code and the tests, explore, launch - think little: they work from a
139
151
  * spec that leaves little to guess, and every turn of theirs is many. The ones that judge - review, weigh, plan, find a
140
152
  * cause - think more: a wrong call there costs pulses. The conversation keeps its own level, pi's.
141
153
  */
@@ -181,11 +193,6 @@ export declare function skillModel(root: string, role?: "harness" | "coding"): s
181
193
  * The coding role always runs on what it is given: its config is already in it (projectModels).
182
194
  */
183
195
  export declare function roleModel(config: Pick<ProjectConfig, "harnessModel" | "judgeModel" | "models">, role: AgentRole): ModelChoice | undefined;
184
- /**
185
- * What the test advisor's calls run on: `models.advisor` - else `default` - and without either the coding
186
- * model alone, thinking as the role has it (ROLE_THINKING). Undefined when the config names no model at all.
187
- */
188
- export declare function advisorModel(config: ProjectConfig): string | undefined;
189
196
  /** How long each turn of a role's agents may take, in milliseconds: its own, `default`'s, `turn-limit:`'s - or undefined, the harness's default. */
190
197
  export declare function roleTurnLimitMs(config: Pick<ProjectConfig, "models" | "turnLimit">, role: AgentRole | undefined): number | undefined;
191
198
  /** `sentinel:` - on, off, or `ask`: on once the person says so, asked before it first opens in a session. */
@@ -220,23 +227,16 @@ export interface ProjectConfig {
220
227
  */
221
228
  allowToStopJobs?: boolean;
222
229
  /**
223
- * Whether every pulse that lands code releases it as its last stage, before the module's next pulse starts - an agent
224
- * looking for the project's release guidance as the chat does, and doing what it says. Unset: false.
230
+ * Whether every pulse that lands code is launched (docs/launch.md): in the background, on the launch track - the newest
231
+ * commit winning, no pulse waiting on it - by an agent that follows the project's launch guidance. Unset: false.
225
232
  */
226
- releaseAfterPulse?: boolean;
233
+ launchAfterPulse?: boolean;
227
234
  /**
228
- * Whether the session has a sentinel: a chat of its own that every finished pulse goes to - checked, a release tested,
235
+ * Whether the session has a sentinel: a chat of its own that every finished pulse goes to - checked, what is launched tested,
229
236
  * and what is wrong put to the person - instead of the chat that asked for it (docs/sentinel.md). `ask`: the person is
230
237
  * asked, before it first opens in a session, whether to start it. Unset: ask.
231
238
  */
232
239
  sentinel?: SentinelSetting;
233
- /**
234
- * Whether the test advisor starts by itself: in the chat and a host, each new or changed functional spec with no
235
- * scenarios is classified in the background, and on a yes the chat writes its scenarios (docs/test-advisor.md). false
236
- * turns off only that: the chat's evaluate_tests still works, and asked for scenarios, the chat writes them as before.
237
- * Unset: true.
238
- */
239
- testAdvisor?: boolean;
240
240
  /**
241
241
  * The folder of the test plain files, from the project's folder: a functional spec's scenarios are in its test plain
242
242
  * file in `<test-dir>/<module>/`. Unset: `tests`.
@@ -244,9 +244,9 @@ export interface ProjectConfig {
244
244
  testDir?: string;
245
245
  /**
246
246
  * Whether functional specs' scenarios are written and conformance tested (conformance-switch.ts). False: none - no
247
- * conformance pulse, no conformance testing script, the test advisor and the chat's conform and evaluate_tests off; the
248
- * test plain files there are kept, and not tested. The person asking for tests, or agreeing to the chat's offer, turns it
249
- * on. Unset: false.
247
+ * conformance pulse, no conformance testing script, the chat's conform refused; the test plain
248
+ * files there are kept, and not tested. They make each change take about twice as long, so only the person turns them
249
+ * on - /conform, or this key. Unset: false.
250
250
  */
251
251
  conformanceTests?: boolean;
252
252
  /**
@@ -277,7 +277,7 @@ export interface ProjectConfig {
277
277
  * session through a job is compacted between turns. The project's alone. Unset: 100k.
278
278
  */
279
279
  compactAt?: number;
280
- /** The most functional specs the planner puts in one pulse. Unset: 3. A stack's file wins. */
280
+ /** The most functional specs the planner puts in one pulse. Unset: 3. A module's own file wins. */
281
281
  maxSpecsPerPulse?: number;
282
282
  /** The most lines of spec - its functional specs and the definitions they bring - in one pulse; past it, split. Unset: 120. */
283
283
  maxLinesPerPulse?: number;
@@ -326,9 +326,8 @@ export declare const CONFIG_KEYS: {
326
326
  readonly review: "review";
327
327
  readonly mutationTesting: "mutation-testing";
328
328
  readonly allowToStopJobs: "allow-to-stop-jobs";
329
- readonly releaseAfterPulse: "release-after-pulse";
329
+ readonly launchAfterPulse: "launch-after-pulse";
330
330
  readonly sentinel: "sentinel";
331
- readonly testAdvisor: "test-advisor";
332
331
  readonly testDir: "test-dir";
333
332
  readonly conformanceTests: "conformance-tests";
334
333
  readonly baseFolder: "base-folder";
@@ -350,10 +349,10 @@ export declare const CONFIG_KEYS: {
350
349
  readonly turnLimit: "turn-limit";
351
350
  };
352
351
  /**
353
- * The project's config - with a stack's over it, when one is named - or nothing of it when there is no file or it does
352
+ * The project's config - with a module's own file over it, when one is named - or nothing of it when there is no file or it does
354
353
  * not parse.
355
354
  */
356
- export declare function readProjectConfig(root: string, stack?: string): ProjectConfig;
355
+ export declare function readProjectConfig(root: string, module?: string): ProjectConfig;
357
356
  /**
358
357
  * What a command's own options say of the config's keys - `turri regenerate --harness-model`, `--coding-model`,
359
358
  * `--judge-model`, `--review`, `--mutation-testing` - read as if the file had them: each takes its key's value, and
@@ -375,13 +374,42 @@ export declare function overrideConfig(overrides: RunOverrides): void;
375
374
  export declare function booleanOption(value: string): boolean | undefined;
376
375
  /** Where the test plain files are when `test-dir:` does not say. */
377
376
  export declare const DEFAULT_TEST_DIR = "tests";
378
- /** The folder of a module's project's test plain files: `test-dir:` - its stack's over the project's - from the project's folder. */
377
+ /** The folder of a module's project's test plain files: `test-dir:` - its own file's over the project's - from the project's folder. */
379
378
  export declare function testDirOf(plainFile: string): string;
380
- /** The config a spec is built with: its project's, with its module's stack over it (`stackForModule`). */
379
+ /** The config a spec is built with: its project's, with its module's own file over it - or a required module's (`configModuleFor`). */
381
380
  export declare function configForSpec(plainFile: string): ProjectConfig;
382
381
  /**
383
382
  * One config file, read, or nothing of it when it is not there or does not parse. Parsed again only once the file has
384
- * changed - its size or its modification time - and each caller given its own copy.
383
+ * changed - its size or its modification time - and each caller given its own copy. A file modified less than a second
384
+ * before it was read is read again each time, as git treats a racily clean file: written again within the same tick of
385
+ * the file system's clock - milliseconds on Linux - and to the same size, its stamp would not change.
385
386
  */
386
387
  export declare function readConfigFile(path: string): ProjectConfig;
388
+ /**
389
+ * The keys of the project's own config files - config.turri.yaml and each module's - that turri reads nothing of: a setting
390
+ * turri no longer has (`test-advisor`), or one misspelt. Said as turri starts, so a setting the person thinks is on is
391
+ * not silently ignored. config.yaml is left out: it may be another tool's, with keys of its own.
392
+ */
393
+ export declare function unknownConfigKeys(root: string): Array<{
394
+ file: string;
395
+ keys: string[];
396
+ }>;
397
+ /**
398
+ * What a line under the banner about a config file is, for a host that draws them without reading their text: `renamed`,
399
+ * a key turri renamed in the file - information, nothing to do; `old-beside-new`, an old name left beside its new one,
400
+ * doing nothing - take it out; `unknown`, keys turri does not read - take them out, or fix their spelling.
401
+ */
402
+ export type ConfigLineKind = "renamed" | "old-beside-new" | "unknown";
403
+ export interface ConfigLine {
404
+ kind: ConfigLineKind;
405
+ /** The file, from the project: `config.turri.yaml`, `config.turri.<module>.yaml`. */
406
+ file: string;
407
+ /** The line, as the terminal shows it. */
408
+ text: string;
409
+ }
410
+ /**
411
+ * The banner's lines for the project's config files: each key turri renamed in them this process, each old name left
412
+ * beside its new one - doing nothing - and each file with keys turri does not read.
413
+ */
414
+ export declare function configLines(root: string): ConfigLine[];
387
415
  export {};