@turri-dev/cli 0.1.12-next.8125d07 → 0.1.13-next.9fe9bb8
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.
- package/dist/config-edit.d.ts +2 -0
- package/dist/config-edit.js +10 -4
- package/dist/host.d.ts +1 -0
- package/dist/host.js +3 -0
- package/docs/hosting.md +1 -0
- package/package.json +1 -1
package/dist/config-edit.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface Setting {
|
|
|
27
27
|
export declare const EFFECT_TEXT: Record<Effect, string>;
|
|
28
28
|
/** Every setting, in the order the list shows them. */
|
|
29
29
|
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. */
|
|
31
|
+
export declare function configSettings(): Setting[];
|
|
30
32
|
/** A setting by its key - `review`, `models.coding` - or nothing. */
|
|
31
33
|
export declare function settingOf(key: string, rules?: string[]): Setting | undefined;
|
|
32
34
|
/** A value read from what was typed: what to write, or that it is to be unset, or why it cannot be. */
|
package/dist/config-edit.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { dump as dumpYaml, load as loadYaml } from "js-yaml";
|
|
4
|
+
import { PACKAGE_ROOT } from "./environment.js";
|
|
5
|
+
import { loadRules } from "./rules.js";
|
|
4
6
|
import { adoptLegacyConfig, AGENT_ROLES, CONFIG_FILE, chosenStack, projectConfigFile, stackConfigFileIn, stacksOf, splitModelSpec, THINKING_LEVELS } from "./config.js";
|
|
5
7
|
/** What each effect is, said to the person. */
|
|
6
8
|
export const EFFECT_TEXT = {
|
|
@@ -53,7 +55,7 @@ export function settings(rules = []) {
|
|
|
53
55
|
},
|
|
54
56
|
]);
|
|
55
57
|
return [
|
|
56
|
-
{ key: "harness-model", about: "the model you talk to: it writes the
|
|
58
|
+
{ key: "harness-model", about: "the model you talk to: it writes the ***plain and plans the work", kind: "model", unset: "pi's own choice", effect: "now", projectOnly: true },
|
|
57
59
|
{ key: "coding-model", about: "the model that writes the code", kind: "model", unset: "harness-model", effect: "next-pulse" },
|
|
58
60
|
{ key: "judge-model", about: "the judge and the test review of a conformance run", kind: "model", unset: "coding-model", effect: "next-pulse" },
|
|
59
61
|
{ key: "module", about: "the .plain file turri regenerate builds when none is named", kind: "path", unset: "the folder's .plain files", effect: "next-regenerate", projectOnly: true },
|
|
@@ -61,7 +63,7 @@ export function settings(rules = []) {
|
|
|
61
63
|
{ key: "conformance-budget", about: "under conformance-tests: chosen or module, how many may be chosen - a count or a share", kind: "budget", options: ["10%", "30%", "50%", "5", "10"], unset: "no limit", effect: "next-plan" },
|
|
62
64
|
{ key: "review", about: "whether the code and its tests are reviewed once they pass", kind: "boolean", unset: "true", effect: "next-pulse" },
|
|
63
65
|
{ 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" },
|
|
64
|
-
{ key: "allow-to-stop-jobs", about: "whether turri stops a running pulse the
|
|
66
|
+
{ key: "allow-to-stop-jobs", about: "whether turri stops a running pulse the ***plain has moved on from", kind: "boolean", unset: "true", effect: "now" },
|
|
65
67
|
{ key: "release-after-pulse", about: "whether every pulse that lands code releases it", kind: "boolean", unset: "false", effect: "next-landing" },
|
|
66
68
|
{ 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" },
|
|
67
69
|
{ key: "conformance-tests-script", about: "the conformance testing script, by path from the project root", kind: "path", unset: "the one run_conformance_tests*.sh found", effect: "next-test-run" },
|
|
@@ -69,10 +71,10 @@ export function settings(rules = []) {
|
|
|
69
71
|
{ key: "testing-scripts-run-on", about: "what the testing scripts run on: the code itself, or a fresh copy", kind: "choice", options: ["in-place", "copy"], unset: "in-place", effect: "next-test-run" },
|
|
70
72
|
{ key: "parallel-jobs", about: "how many pulses run at once, on modules that share nothing", kind: "number", options: ["1", "2", "3", "4", "6"], min: 1, unset: "half this machine's cores, one to four", effect: "now", projectOnly: true },
|
|
71
73
|
{ key: "max-specs-per-pulse", about: "the most functional specs the planner groups into one pulse", kind: "number", options: ["1", "2", "3", "4", "5", "6"], min: 1, unset: "3", effect: "next-plan" },
|
|
72
|
-
{ key: "max-lines-per-pulse", about: "the most lines of
|
|
74
|
+
{ 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" },
|
|
73
75
|
{ 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" },
|
|
74
76
|
{ 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 },
|
|
75
|
-
{ key: "rules-off", about: "***plain rules left out of the
|
|
77
|
+
{ 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 },
|
|
76
78
|
{ key: "agent-env.files", about: "dotenv files whose variables the agents' commands get", kind: "list", unset: "none", effect: "next-pulse", projectOnly: true },
|
|
77
79
|
{ 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 },
|
|
78
80
|
{ 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 },
|
|
@@ -82,6 +84,10 @@ export function settings(rules = []) {
|
|
|
82
84
|
...roles,
|
|
83
85
|
];
|
|
84
86
|
}
|
|
87
|
+
/** Every setting, as a host is given them: rules-off offering turri's own rules, as /turri-config offers them. */
|
|
88
|
+
export function configSettings() {
|
|
89
|
+
return settings(loadRules(join(PACKAGE_ROOT, "genome", "rules")).map((rule) => rule.name));
|
|
90
|
+
}
|
|
85
91
|
/** A setting by its key - `review`, `models.coding` - or nothing. */
|
|
86
92
|
export function settingOf(key, rules = []) {
|
|
87
93
|
return settings(rules).find((setting) => setting.key === key.trim().toLowerCase().replace(/_/g, "-"));
|
package/dist/host.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type { AskUserIO } from "./ask.ts";
|
|
|
10
10
|
export * as pi from "@earendil-works/pi-coding-agent";
|
|
11
11
|
export { configForSpec, debugMode, hasProjectConfig, modelSpec, projectModels, readProjectConfig, stacksOf, type ProjectConfig } from "./config.ts";
|
|
12
12
|
export { MODULES_DIR, projectDirOf, resolveTemplateDirs } from "./regenerate/paths.ts";
|
|
13
|
+
export { configSettings, currentValue, EFFECT_TEXT, overriddenBy, readConfigText, type Effect, type Setting, type SettingKind } from "./config-edit.ts";
|
|
13
14
|
export { BEDROCK_DEFAULT, BEDROCK_GEOGRAPHIES, BEDROCK_IN_REGION, BEDROCK_REGIONS, bedrockAwsRegion, bedrockDefaultModels, bedrockMakers, bedrockModels, bedrockModelsIn, bedrockNeedsAwsRegion, bedrockPlaceOf, initConfig, makerLabel, VENDORS, type BedrockChoice, type BedrockMaker, type BedrockOffer, type InitConfigOptions, type ModelChoice, type ModelSet, type Vendor, } from "./init-config.ts";
|
|
14
15
|
export { piModelCatalogue, type CatalogueModel, type ModelCatalogue } from "./model-check.ts";
|
|
15
16
|
export { doctor, type Check, type DoctorOptions, type Level } from "./setup.ts";
|
package/dist/host.js
CHANGED
|
@@ -11,6 +11,9 @@ export * as pi from "@earendil-works/pi-coding-agent";
|
|
|
11
11
|
// The project and its settings.
|
|
12
12
|
export { configForSpec, debugMode, hasProjectConfig, modelSpec, projectModels, readProjectConfig, stacksOf } from "./config.js";
|
|
13
13
|
export { MODULES_DIR, projectDirOf, resolveTemplateDirs } from "./regenerate/paths.js";
|
|
14
|
+
// Every setting of config.turri.yaml as /turri-config knows it - what it takes, what it is unset, when a change takes
|
|
15
|
+
// effect - and what the file has now: for a host that shows them all, changing each through /turri-config.
|
|
16
|
+
export { configSettings, currentValue, EFFECT_TEXT, overriddenBy, readConfigText } from "./config-edit.js";
|
|
14
17
|
// A project's first config.turri.yaml, as `turri init-config` writes it - the vendor, or the two models themselves, chosen by the host.
|
|
15
18
|
export { BEDROCK_DEFAULT, BEDROCK_GEOGRAPHIES, BEDROCK_IN_REGION, BEDROCK_REGIONS, bedrockAwsRegion, bedrockDefaultModels, bedrockMakers, bedrockModels, bedrockModelsIn, bedrockNeedsAwsRegion, bedrockPlaceOf, initConfig, makerLabel, VENDORS, } from "./init-config.js";
|
|
16
19
|
// pi's model catalogue, read without a request: what initConfig checks the models given against, and what a host offers.
|
package/docs/hosting.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| `createTurriExtension(host)` | turri's conversation as an extension of [pi](https://pi.dev)'s: every tool, slash command, rule and skill the terminal has. The host is told of its jobs and asks its questions - see below. |
|
|
12
12
|
| `pi` | [pi](https://pi.dev) itself, as turri's extension is built against it. Make the session with this one - `pi.createAgentSession`, `pi.DefaultResourceLoader` - not another copy. |
|
|
13
13
|
| `readProjectConfig`, `projectModels`, `modelSpec`, `configForSpec`, `hasProjectConfig`, `stacksOf` | the project's settings, as [config.turri.yaml](config.md) has them. |
|
|
14
|
+
| `configSettings`, `currentValue`, `readConfigText`, `overriddenBy`, `EFFECT_TEXT` | every setting of config.turri.yaml as [/turri-config](config.md#changing-it-from-the-chat) knows it - its key, what it does, its kind (a yes or no, one of a few words, a number, a model, a list, a path, a budget), its words or the values offered first, what it is unset and when a change takes effect - and what the file has now (`currentValue(readConfigText(dir), key)`), and what wins over it. Change one as the person would, by sending `/turri-config <key> <value>` to the chat: turri checks it and writes it with the file's comments kept. |
|
|
14
15
|
| `debugMode` | whether turri keeps, in a project, what it writes only for debugging it - `debug:`, or `TURRI_DEBUG` over it (see [debug mode](config.md#debug-mode)). |
|
|
15
16
|
| `initConfig(dir, { vendor, bedrock, models, force, catalogue })`, `VENDORS`, `BEDROCK_REGIONS`, `BEDROCK_DEFAULT` | a project's first config.turri.yaml, as `turri init-config` writes it - async, it may read [pi](https://pi.dev)'s catalogue - see [a project's first config](#a-projects-first-config). |
|
|
16
17
|
| `piModelCatalogue`, `bedrockMakers`, `bedrockModelsIn`, `bedrockDefaultModels`, `bedrockModels`, `bedrockPlaceOf`, `makerLabel`, `BEDROCK_GEOGRAPHIES`, `BEDROCK_IN_REGION` | [pi](https://pi.dev)'s model catalogue, read without a request, and Bedrock in it: whose models it serves, in which geographies, which two turri offers for a maker and geography. |
|