@turri-dev/core 0.1.1-next.35d4c49 → 0.1.1-next.ad4aa8f
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/CHANGELOG.md +56 -0
- package/README.md +17 -11
- package/dist/api/models.d.ts +9 -0
- package/dist/api/models.js +15 -0
- package/dist/api/plain.d.ts +6 -6
- package/dist/api/plain.js +4 -7
- package/dist/api/project.d.ts +35 -0
- package/dist/api/project.js +47 -0
- package/dist/api/session.d.ts +48 -0
- package/dist/api/session.js +17 -0
- package/dist/api/system.d.ts +18 -0
- package/dist/api/system.js +23 -0
- package/dist/btw.d.ts +1 -1
- package/dist/capture/capture.js +11 -8
- package/dist/capture/chat.d.ts +0 -11
- package/dist/capture/chat.js +0 -29
- package/dist/capture/config.d.ts +4 -5
- package/dist/capture/config.js +34 -20
- package/dist/capture/models.d.ts +2 -1
- package/dist/capture/models.js +1 -0
- package/dist/chat-entries.d.ts +81 -39
- package/dist/chat-entries.js +125 -11
- package/dist/chat-model.d.ts +37 -0
- package/dist/chat-model.js +61 -0
- package/dist/chats.d.ts +54 -42
- package/dist/chats.js +86 -80
- package/dist/client.d.ts +30 -0
- package/dist/client.js +12 -0
- package/dist/config-edit.d.ts +54 -1
- package/dist/config-edit.js +103 -33
- package/dist/config.d.ts +12 -9
- package/dist/config.js +38 -9
- package/dist/doctor-checks.d.ts +42 -0
- package/dist/doctor-checks.js +39 -0
- package/dist/environment.d.ts +2 -23
- package/dist/environment.js +5 -68
- package/dist/errors.d.ts +32 -0
- package/dist/errors.js +24 -0
- package/dist/extension.d.ts +23 -16
- package/dist/extension.js +170 -234
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +13 -9
- package/dist/init-config.d.ts +11 -9
- package/dist/init-config.js +15 -7
- package/dist/launch-session.d.ts +2 -0
- package/dist/launch-session.js +17 -1
- package/dist/loop-tools.js +11 -10
- package/dist/module-check.d.ts +13 -0
- package/dist/module-check.js +117 -0
- package/dist/notice.d.ts +5 -0
- package/dist/parse-tool.js +3 -2
- package/dist/plain/check.d.ts +27 -13
- package/dist/plain/check.js +51 -116
- package/dist/plain/files.d.ts +2 -0
- package/dist/plain/files.js +13 -0
- package/dist/plain/graph.js +2 -2
- package/dist/plain/highlight.d.ts +4 -20
- package/dist/plain/highlight.js +7 -5
- package/dist/project.d.ts +19 -0
- package/dist/project.js +34 -0
- package/dist/quiet.d.ts +0 -2
- package/dist/quiet.js +0 -14
- package/dist/regenerate/command-check.d.ts +0 -8
- package/dist/regenerate/command-check.js +133 -53
- package/dist/regenerate/conversation-writes.d.ts +5 -1
- package/dist/regenerate/conversation-writes.js +7 -3
- package/dist/regenerate/jobs.d.ts +25 -2
- package/dist/regenerate/jobs.js +3 -0
- package/dist/regenerate/launch.d.ts +1 -0
- package/dist/regenerate/launch.js +9 -0
- package/dist/regenerate/ledger-view.d.ts +14 -14
- package/dist/regenerate/ledger.d.ts +1 -0
- package/dist/regenerate/ledger.js +4 -2
- package/dist/regenerate/loop.d.ts +2 -1
- package/dist/regenerate/loop.js +9 -1
- package/dist/regenerate/os-sandbox.d.ts +4 -2
- package/dist/regenerate/os-sandbox.js +0 -1
- package/dist/regenerate/regenerate.js +2 -1
- package/dist/regenerate/requires-chain.d.ts +44 -0
- package/dist/regenerate/requires-chain.js +174 -0
- package/dist/regenerate/requires.d.ts +2 -40
- package/dist/regenerate/requires.js +14 -171
- package/dist/regenerate/resources.d.ts +0 -2
- package/dist/regenerate/resources.js +2 -14
- package/dist/regenerate/shell.js +20 -9
- package/dist/regenerate/spec-map.d.ts +2 -0
- package/dist/regenerate/spec-map.js +4 -0
- package/dist/regenerate/standing.d.ts +5 -2
- package/dist/run-report.js +2 -2
- package/dist/self-invocation.d.ts +1 -1
- package/dist/self-invocation.js +2 -3
- package/dist/sentinel-chat.js +7 -11
- package/dist/sentinel.d.ts +1 -1
- package/dist/sentinel.js +12 -5
- package/dist/session-events.d.ts +14 -0
- package/dist/session.d.ts +594 -0
- package/dist/session.js +672 -0
- package/dist/settings.d.ts +28 -2
- package/dist/settings.js +92 -56
- package/dist/setup.d.ts +6 -30
- package/dist/setup.js +28 -105
- package/dist/stack.d.ts +25 -12
- package/dist/stack.js +77 -12
- package/dist/surface.d.ts +2 -2
- package/dist/surface.js +4 -5
- package/dist/work.d.ts +125 -0
- package/dist/work.js +250 -0
- package/docs/README.md +2 -3
- package/docs/capture.md +4 -4
- package/docs/chats.md +5 -3
- package/docs/claude-subscription.md +2 -2
- package/docs/config.md +4 -4
- package/docs/core.md +105 -128
- package/docs/development.md +9 -9
- package/docs/headless.md +1 -1
- package/docs/installation.md +4 -2
- package/docs/launch.md +2 -2
- package/docs/parser.md +1 -1
- package/docs/regenerating.md +1 -1
- package/docs/sandbox.md +4 -4
- package/docs/sentinel.md +4 -4
- package/docs/skills-and-gates.md +1 -1
- package/docs/using.md +2 -2
- package/genome/rules/integration-embedded-testing.md +3 -3
- package/genome/rules/integration-embedded.md +3 -3
- package/genome/skills/implement-conformance-testing-script/SKILL.md +6 -4
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +13 -11
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +8 -7
- package/genome/skills/implement-unit-testing-script/SKILL.md +7 -5
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_java.sh +9 -13
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.sh +1 -1
- package/package.json +19 -32
- package/dist/api/commands.d.ts +0 -45
- package/dist/api/commands.js +0 -54
- package/dist/api/config.d.ts +0 -8
- package/dist/api/config.js +0 -8
- package/dist/api/ledger.d.ts +0 -3
- package/dist/api/ledger.js +0 -3
- package/dist/api/startup.d.ts +0 -8
- package/dist/api/startup.js +0 -8
- package/dist/api/terminal.d.ts +0 -18
- package/dist/api/terminal.js +0 -16
- package/dist/chat-models.d.ts +0 -11
- package/dist/chat-models.js +0 -11
- package/dist/chat-ui.d.ts +0 -33
- package/dist/chat-ui.js +0 -192
- package/dist/headless.d.ts +0 -99
- package/dist/headless.js +0 -226
- package/dist/host-session.d.ts +0 -136
- package/dist/host-session.js +0 -139
- package/dist/host.d.ts +0 -8
- package/dist/host.js +0 -17
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -7
- package/dist/notifications.d.ts +0 -21
- package/dist/notifications.js +0 -44
- package/dist/reopen.d.ts +0 -29
- package/dist/reopen.js +0 -47
- package/dist/turri-versions.d.ts +0 -71
- package/dist/turri-versions.js +0 -276
- package/dist/view.d.ts +0 -78
- package/dist/view.js +0 -1
- package/docs/hosting.md +0 -284
package/docs/sandbox.md
CHANGED
|
@@ -62,16 +62,16 @@ The project's testing scripts - their static checks included - are not agents' c
|
|
|
62
62
|
|
|
63
63
|
Before an agent's command runs, its text is checked (`src/regenerate/command-check.ts`, `checkCommand`), on every platform, and refused - not run - with the rule it broke and what to do instead, when it:
|
|
64
64
|
|
|
65
|
-
- names a path outside the role's roots - absolute, a `..` that climbs out of the agent's folder (after the `cd`s before it), or inside a quoted string (`python3 -c "..."`). `~`, `$HOME` and `$TMPDIR` are the module's own and allowed, as are the package caches, the machine's system folders and the toolchains, and the devices (`/dev/null`). A path is checked when it names something on disk - under a top folder such as `/Users`, `/home`, `/etc` or `/tmp`, one of the fence's, or one that exists - so an API route in a curl or a JSON body is not one, and nor is `/` alone, a slash in code (`case '/':`), though writing to `/` is refused;
|
|
65
|
+
- names a path outside the role's roots - absolute, a `..` that climbs out of the agent's folder (after the `cd`s before it), or inside a quoted string (`python3 -c "..."`) - or writes one outside where it may write: a redirection, `tee`, the target of `cp`, `mv`, `install` and `ln` (`-t` too), what `touch`, `rm`, `mkdir`, `truncate`, `chmod` and `chown` are given - never an option's value (`truncate -s 1073741825 big.mp4` writes `big.mp4`) - and a file `sed -i` edits. A variable the command line sets itself is read where it is used (`D=$TMPDIR/t1; cd $D; touch a.txt` writes in `$TMPDIR`); a `cd` into what only running the line tells (`cd "$(mktemp -d)"`, a variable from outside the line) leaves the folder unknown, and what is named from it is the OS sandbox's to tell. `~`, `$HOME` and `$TMPDIR` are the module's own and allowed, as are the package caches, the machine's system folders and the toolchains, and the devices (`/dev/null`). A path is checked when it names something on disk - under a top folder such as `/Users`, `/home`, `/etc` or `/tmp`, one of the fence's, or one that exists - so an API route in a curl or a JSON body is not one, and nor is `/` alone, a slash in code (`case '/':`), though writing to `/` is refused;
|
|
66
66
|
- names the code record, `.turri.json`;
|
|
67
67
|
- writes a credential file (`.env` and its variants; a template is fine) - by redirect, `tee`, `cp`, `mv` or an edit in place;
|
|
68
68
|
- changes a setting of the machine's or the person's environment: `defaults write`, `launchctl`, `systemctl enable`, `sysctl -w`, `git config --global`, `npm config set`, a line written to a shell profile (`~/.zshrc`) or `/etc`. The same rule (`machineChange`) holds in every shell turri runs, not only the agents': the chat's and the launch agent's refuse an install or a system setting too, asked or not - turri changes nothing of the machine's;
|
|
69
69
|
- installs software outside the project: `sudo`, the system's package managers installing (`brew`, `apt`, `dnf`, `apk`, `pacman`, `choco`, `winget`, ...), toolchain managers installing (`nvm`, `sdk`, `rustup`, `pyenv`, `asdf`, ...), global installs (`npm -g`, `yarn global`, `pip --user`, `pipx`, `gem install`), a script downloaded and run (`curl ... | sh`, `| python3 -`; a response piped to an interpreter given its code by an option - `| python3 -c '...'`, `| python3 -m json.tool`, `| node -e` - is data it reads, and passes), an installer (`.pkg`, `.msi`, `.dmg`, `.run`). The project's own dependencies - `npm install`, pip into its venv, `mvn`, `cargo`, `go mod` - are building the code, and pass;
|
|
70
70
|
- kills what its pulse did not start: `pkill`, `killall`, `taskkill`, `fuser -k`, or `kill` aimed at a port or name lookup. `kill $!` and `kill %1` pass.
|
|
71
71
|
|
|
72
|
-
It reads the command as the shell reads its operators: a `>`, `<`, `|`, `&` or `;` inside quotes is text (`grep -rl "</content>" .` redirects nothing), and so is the body of a here-document fed to `cat` or `tee` under a quoted delimiter (`cat > src/App.tsx <<'EOF'`) - the text of a file being written, whose `../lib/logger` is an import, not a path. A body that runs - under an unquoted delimiter, where `$(...)` expands, or fed to a shell
|
|
72
|
+
It reads the command as the shell reads its operators: a `>`, `<`, `|`, `&` or `;` inside quotes is text (`grep -rl "</content>" .` redirects nothing), and so is the body of a here-document fed to `cat` or `tee` under a quoted delimiter (`cat > src/App.tsx <<'EOF'`) - the text of a file being written, whose `../lib/logger` is an import, not a path. A body that runs as shell - under an unquoted delimiter, where `$(...)` expands, or fed to a shell - and a `$(...)` in double quotes are checked as commands. A body fed to anything else under a quoted delimiter (`python3 - <<'EOF'`) is that program's code: it is checked for the paths it names, never read as the shell's - a `>` in a Go comment inside a Python string redirects nothing, and an apostrophe in it leaves the shell's quotes after it as they were. So the installs, the system settings and the kills are looked for a simple command at a time, split where the shell splits - `grep -rn "main\|uvicorn.run" app` is one command, not a `.run` installer - and in the script a shell is handed as a word of its own (`bash -c "cd app; pip install --user x"`, `eval`), which a string hides from the line.
|
|
73
73
|
|
|
74
|
-
On Windows, drive letters, backslashes and any case are read as Windows has them. It knowingly misses a path built at run time (`$(...)`, a variable, a script that reads one from a file): the OS sandbox and the audit are for those.
|
|
74
|
+
On Windows, drive letters, backslashes and any case are read as Windows has them. It knowingly misses a path built at run time (`$(...)`, a variable from outside the line, a script that reads one from a file): the OS sandbox and the audit are for those.
|
|
75
75
|
|
|
76
76
|
### The OS sandbox
|
|
77
77
|
|
|
@@ -87,7 +87,7 @@ Under the check, where the OS offers one, the command runs behind an OS sandbox
|
|
|
87
87
|
|
|
88
88
|
### The audit
|
|
89
89
|
|
|
90
|
-
After every agent command, on every platform - a sandbox up or not - turri puts back what the command's role may not change inside the project (`src/regenerate/audit.ts`): \*\*\*plain, `config*.yaml`, the testing scripts, every credential file (the agent's own folder included), the code record, the module's lineage `.plaingit` (its refs and settings), the other modules, the folders the role only reads, and the part of its own module it does not write - the coding agent's conformance tests. A changed file is put back, a new one removed, a deleted one brought back: from a copy kept before the command, or - another module - as its last commit has it, unless a pulse is at work in that module, whose writes are not this command's to undo (left, and logged). Nor is a change the conversation made while the command ran: the chat's `edit` and `write`, a \*\*\*plain diff it applied, or anything while a command of its own ran - the chat editing \*\*\*plain beside a pulse is the person's change, not the agent's, so it is left and logged (`src/regenerate/conversation-writes.ts`). The agents of a pulse start without extensions, so nothing of theirs is marked so. The agent is told in its command's result what was put back; the job's log gets a line; you are not told, and the pulse goes on. It compares sizes and modification times, skipping dependencies and build output, and contents only where those differ - about 35 ms on a project of 3000 files. Outside the project nothing can be put back: that is the OS sandbox's, and on Windows an accepted gap.
|
|
90
|
+
After every agent command, on every platform - a sandbox up or not - turri puts back what the command's role may not change inside the project (`src/regenerate/audit.ts`): \*\*\*plain, `config*.yaml`, the testing scripts, every credential file (the agent's own folder included), the code record, the module's lineage `.plaingit` (its refs and settings), the other modules, the folders the role only reads, and the part of its own module it does not write - the coding agent's conformance tests. A changed file is put back, a new one removed, a deleted one brought back: from a copy kept before the command, or - another module - as its last commit has it, unless a pulse is at work in that module, whose writes are not this command's to undo (left, and logged). Nor is a change the conversation made while the command ran: the chat's `edit` and `write`, a \*\*\*plain diff it applied, or anything while a command of its own ran - the chat editing \*\*\*plain beside a pulse is the person's change, not the agent's, so it is left and logged - one that ended in the millisecond the command began too, which the clock cannot place before it or after (`src/regenerate/conversation-writes.ts`). The agents of a pulse start without extensions, so nothing of theirs is marked so. The agent is told in its command's result what was put back; the job's log gets a line; you are not told, and the pulse goes on. It compares sizes and modification times, skipping dependencies and build output, and contents only where those differ - about 35 ms on a project of 3000 files. Outside the project nothing can be put back: that is the OS sandbox's, and on Windows an accepted gap.
|
|
91
91
|
|
|
92
92
|
## The web
|
|
93
93
|
|
package/docs/sentinel.md
CHANGED
|
@@ -37,9 +37,9 @@ Each pulse it checks from scratch, in a conversation of its own: its prompt, you
|
|
|
37
37
|
2. **tests what was launched**, with `launch-after-pulse` on: what runs is where it is told, and it tries it - in the terminal with its shell (`curl`, the program itself, the logs), in a host also with what the host gives it, a browser say. How far it tests is its own judgement, from what the pulse changed and what the \*\*\*plain says it now does - but not what a later pulse in the same launch changed again: that is the later pulse's check. Where the \*\*\*plain picks one way among several - which of a tie comes first, how a default is chosen - it tries an input on which the ways give different answers, so a pass shows the \*\*\*plain's way and no other. With `launch-after-pulse` off nothing is running, and it checks the pulse alone;
|
|
38
38
|
3. **finds out why**, when something is wrong - the pulse failed or stopped, it did not pass, the launch did not come up, the software does not do what its \*\*\*plain says. A testing script, or where the config says the scripts are, it fixes itself, resumes the module, and tells you what it changed (below). Anything else it puts to you as a notice, each action a task your chat's agent can carry out once you accept it - and what the machine lacks, the exact command for you to run;
|
|
39
39
|
4. **notifies no one** when all is well;
|
|
40
|
-
5. **concludes**, last, whether all is well or not: what it checked and what it found, in a line or two. Read the conclusion in notifications, or ask your chat about it.
|
|
40
|
+
5. **concludes**, last, whether all is well or not: what it checked and what it found, in a line or two. Read the conclusion in notifications, or ask your chat about it. It comes with how you try what it tested yourself, as the launch it tested in said it - where it runs, or the commands to run a command-line tool or a library from `dist/<module>` - so you hear it though the sentinel did the testing.
|
|
41
41
|
|
|
42
|
-
A host can ask it to check too: functional specs the person picks in a module - its own, or those of any module its requires chain builds on (`depths:gene-fragments` in predators') - in turri-desktop, on the preview's list of a module's built ones. It tests those, on its own judgement, in what is launched of the module - its own codebase's code - once the codebase's launches are settled, and reports as for a pulse: a notice when something is wrong, and its conclusion. The sentinel launches nothing: with nothing of the module launched - never, or you halted it - the check ends unchecked, its conclusion saying so - "ask the chat to try it first, which launches it" - and nothing else: it is an answer, not an error; when its last launch did not come up, that is what the sentinel finds out about, as for a pulse. It is refused with the sentinel off, and for a module that does not parse, a functional spec it does not have, or one not built; see [in a host](
|
|
42
|
+
A host can ask it to check too: functional specs the person picks in a module - its own, or those of any module its requires chain builds on (`depths:gene-fragments` in predators') - in turri-desktop, on the preview's list of a module's built ones. It tests those, on its own judgement, in what is launched of the module - its own codebase's code - once the codebase's launches are settled, and reports as for a pulse: a notice when something is wrong, and its conclusion. The sentinel launches nothing: with nothing of the module launched - never, or you halted it - the check ends unchecked, its conclusion saying so - "ask the chat to try it first, which launches it" - and nothing else: it is an answer, not an error; when its last launch did not come up, that is what the sentinel finds out about, as for a pulse. It is refused with the sentinel off, and for a module that does not parse, a functional spec it does not have, or one not built; see [in a host](core.md).
|
|
43
43
|
|
|
44
44
|
It checks every pulse, one at a time, in the order they finished. A pulse that finishes while it works waits its turn, and is checked once it is done - from scratch, as every pulse is. None takes the place of another: a newer pulse of a module waits behind the check of the one before it.
|
|
45
45
|
|
|
@@ -75,7 +75,7 @@ Switch to its chat and say how to check your software - *test the sign-up flow a
|
|
|
75
75
|
|
|
76
76
|
## Closing it
|
|
77
77
|
|
|
78
|
-
It closes like any chat (`/chat close`, `alt+w`, a
|
|
78
|
+
It closes like any chat (`/chat close`, `alt+w`, a front end's `chats.close`), and that does not turn it off: what it was checking is stopped, the pulses that waited for it are let go, and the next pulse that finishes opens it again, with a fresh conversation - and your guidance. `turri --continue` reopens it with the other chats, with the conversation of the last pulse it was on; the next pulse starts a fresh one. `sentinel: false` - in `config.turri.yaml`, or with `/sentinel off` or `/settings` - turns it off: from the next pulse that finishes, a pulse is told to the chat that asked for it, whose agent reacts to it, as without one.
|
|
79
79
|
|
|
80
80
|
It has a slot of its own: with it on, you open up to eight chats, and the ninth is the sentinel's, open or not.
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ The `sentinel` role in `models:` - else the chat's model, `models.chat` else `ha
|
|
|
85
85
|
|
|
86
86
|
## In a host
|
|
87
87
|
|
|
88
|
-
A host sees the sentinel as one of its chats - `role: "sentinel"` in `chats()` and `
|
|
88
|
+
A host sees the sentinel as one of its chats - `role: "sentinel"` in `chats.list()` and the `chats` event - and never has focus moved to it. Each pulse's fresh conversation is a new pi session in the same chat, under the same id: `onChatSession(chat, session)` comes before the pulse is put to it, and `session(id)` returns the new one. Under `sentinel: ask`, the question before it first opens comes as a notice like the others, with `kind: "sentinel-start"`, its actions the four answers: `answer(id, { action })` answers it - by index or label - and `{ dismiss: true }` is not this session. Each notice comes as `onNotice(notice)` - `{ id, chat, module, pulse, job, severity, summary, evidence, actions, state }`, `chat` the one to draw it in - and `onNoticeOver(notice)` when it is answered or superseded; `notices()` lists those open. `answer(id, { action } | { steer } | { dismiss: true } | { ignore: true })` answers one, as the terminal's dialog does - `{ ignore: true }` only on a notice with `ignorable: true`, `"refused"` on any other; it ends `state: "ignored"`. `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes as it is done with a pulse, all well or not - told to the chat `chat` too. The sentinel's own tools - a browser - are given with `createTurri({ sentinel: { tools } })`, and it is told it has them. `sentinel: { surface }` says, in the host's words, where the person watches it use them: then it tries what is launched with them, where the person can watch, and keeps its shell for what they cannot show - logs, exit codes, files. Without it, the person does not watch the sentinel, and the host's tools are only to test with as well. See [running turri in a host](core.md).
|
|
89
89
|
|
|
90
90
|
## In the ledger
|
|
91
91
|
|
package/docs/skills-and-gates.md
CHANGED
|
@@ -47,7 +47,7 @@ A step ends when its agent's turn does. A turn that ends on a question in the re
|
|
|
47
47
|
|
|
48
48
|
`phases:` under `metadata:` says what each step does, in a short line a step by its name - for the person, not the agent: while the skill runs, the line above the input shows its phases, and under them the one it is in with its line (`stack - the language, frameworks, storage and architecture`). A phase's name alone says little to someone who has not read the skill. Every skill with more than one step describes each; a line for a step the skill does not have is an error, as a gate after one is.
|
|
49
49
|
|
|
50
|
-
A foreground run reports those phases as data.
|
|
50
|
+
A foreground run reports those phases as data. Every front end gets a `skillProgress` event for its chat, and draws it as it draws. `current` is `-1` before the first step and then its zero-based position, `attempt` starts at one, and `about` is the step's description when it has one. A `null` progress clears the display when the run ends, including on interruption or error.
|
|
51
51
|
|
|
52
52
|
A skill gets the tools its `allowed-tools` names, and nothing else: one that names none has none. So every skill here names its own - the file tools (`read`, `write`, `edit`, `ls`, `grep`, `find`) for the ones that write \*\*\*plain, resources or scripts, `bash` only for those that need a shell (running the testing script they write, deleting a module they split up), only the reading ones for those that analyse and report, and turri's own (the ones below) where a skill uses them.
|
|
53
53
|
|
package/docs/using.md
CHANGED
|
@@ -122,7 +122,7 @@ judge-model:
|
|
|
122
122
|
|
|
123
123
|
Each may leave out either part, and a bare string (`coding-model: provider/id`, or `provider/id:high`) is a model alone. What one leaves out it takes from the one it inherits from: the judge model from the coding model, the coding model from the harness model - so with only a harness model, everything runs on it.
|
|
124
124
|
|
|
125
|
-
On the command line, `turri --harness-model <m> --coding-model <m>` wins over
|
|
125
|
+
On the command line, `turri --harness-model <m> --coding-model <m>` is read as the file's `harness-model` and `coding-model` for that session - a `models:` entry for the role still wins over it, as it wins over the file's key ([pi](https://pi.dev)'s own `--model` works for the harness model too) - and in the conversation [pi](https://pi.dev)'s `/model` changes the harness model and the `settings` tool, below, the coding model. `model:`, from before there were two, is read as `coding-model`. With neither, regenerations run on the conversation's model.
|
|
126
126
|
|
|
127
127
|
Every regeneration runs on the coding model unless you say otherwise. Say it in words - "regenerate with gpt 5.5 from now on", "use Claude for the code" - and the agent's `settings` tool writes `coding-model` into `config.turri.yaml`, from the next pulse on, in every [chat](chats.md) and the sessions after; a module's own model goes in its own file. Pulses already queued keep the model they were queued with. For one regeneration alone - "regenerate this on Gemini 3.6 Flash" - the agent passes the model to `regenerate` or `conform` instead, and the config stays as it was.
|
|
128
128
|
|
|
@@ -173,7 +173,7 @@ It is in `.turri/ledger/` in the project, a JSON line an event, one file a run -
|
|
|
173
173
|
|
|
174
174
|
| | |
|
|
175
175
|
| --- | --- |
|
|
176
|
-
| runs | `run.started` (how it was started, turri's version and commit, the machine), `run.ended` |
|
|
176
|
+
| runs | `run.started` (how it was started - the front end's own word, `mode` - who started it - `client` - turri's version and commit, the machine), `run.ended` |
|
|
177
177
|
| pulses | `job.queued` (with the functional specs it covers, by case), `job.diff` (its \*\*\*plain diff, whole, and where its lines are written - again each time steering moves it), `job.started`, every `job.stage`, `job.retried`, `job.finished` - its status, whether it landed, how long it ran, what it cost, how it ended |
|
|
178
178
|
| the work loop | `loop.halted`, `loop.stopped` (a pulse \*\*\*plain moved on from), `loop.renamed` (a pure rename turri made itself - a func-id or a scenario-id, from and to), `planner.failed`, `planner.fellBack` |
|
|
179
179
|
| the model | `model.call` (time and tokens), `model.turn`, `model.compaction`, `provider.retry`, `provider.stall`, `provider.error`, `turn.stopped` (a turn turri ended itself, and why) |
|
|
@@ -10,12 +10,12 @@ When an embedded integration ships its two `test_scripts/` (unit, conformance),
|
|
|
10
10
|
|
|
11
11
|
A module's code and unit tests live in `plain_modules/<module>/code`; its conformance tests live in one folder, `plain_modules/<module>/tests` — the module's whole conformance suite. turri runs both scripts on the person's machine, once per check: `bash run_unittests_<lang>.sh <build_folder>` decides whether the unit tests pass, and `bash run_conformance_tests_<lang>.sh <build_folder> <conformance_tests_folder>` (absolute paths) runs the whole conformance suite at once and decides whether the conformance tests pass. There is no prepare-environment script, so each script is self-contained.
|
|
12
12
|
|
|
13
|
-
Embedded integrations need a runnable host project, so both scripts stage the generated code **inside the host codebase itself**. The conformance script additionally builds / installs the host and then runs the conformance suite from a scratch folder in the system temp directory (
|
|
13
|
+
Embedded integrations need a runnable host project, so both scripts stage the generated code **inside the host codebase itself**. The conformance script additionally builds / installs the host and then runs the conformance suite from a scratch folder of its own in the system temp directory (`mktemp -d "/tmp/<lang>_conformance.XXXXXX"` - never a fixed name, which two runs at once would share), because the conformance suite lives in a separate project.
|
|
14
14
|
|
|
15
15
|
| Script | Where it operates | What it does to the host source tree |
|
|
16
16
|
|--------|-------------------|---------------------------------------|
|
|
17
17
|
| `run_unittests_<lang>` | Inside the host codebase | Copies `$1` into the module's package path under the host's source tree, then runs the module's unit tests + lint inside the host |
|
|
18
|
-
| `run_conformance_tests_<lang>` | Inside the host codebase, then
|
|
18
|
+
| `run_conformance_tests_<lang>` | Inside the host codebase, then a scratch folder of its own (`mktemp -d "/tmp/<lang>_conformance.XXXXXX"`) | Same copy as above, then cleans and builds / installs the host project; copies `$2` (the conformance-tests folder) into the scratch directory, builds the conformance project, and runs the whole suite there against the host build it just installed |
|
|
19
19
|
|
|
20
20
|
This deliberately writes into the host's `src/main/...` and `src/test/...` (or the language equivalent). Two consequences flow from that:
|
|
21
21
|
|
|
@@ -136,7 +136,7 @@ Both scripts are invoked by turri with positional arguments, on the person's mac
|
|
|
136
136
|
4. **Respect `VERBOSE=1`.** Gate chatty diagnostic prints behind `if [ "${VERBOSE:-}" = "1" ]` (and the PowerShell equivalent). Errors and key step markers print unconditionally
|
|
137
137
|
5. **Resolve paths relative to the script, not `$PWD`.** Use `"$(cd "$(dirname "$0")/<relative-path-to-anchor>" && pwd)"`. Hard-coded `../../` chains break the moment turri's `cwd` changes
|
|
138
138
|
6. **Create destination directories before copying.** `mkdir -p` before any `cp -R` / `rsync` / `robocopy` — most copy commands do not create intermediate directories and fail silently in some shells
|
|
139
|
-
7. **Scope destructive operations narrowly.** Any `rm -rf` (or `Remove-Item -Recurse -Force`) targets only the module's own package path inside the working folder — never the host's `src/`, `target/`, `node_modules/`, `build/`, or `dist/` at the project root. The conformance script cleans the host's build-output directory (e.g. `./target`) only as part of its own build / install step, and removes its system-temp scratch folder on exit
|
|
139
|
+
7. **Scope destructive operations narrowly.** Any `rm -rf` (or `Remove-Item -Recurse -Force`) targets only the module's own package path inside the working folder — never the host's `src/`, `target/`, `node_modules/`, `build/`, or `dist/` at the project root. The conformance script cleans the host's build-output directory (e.g. `./target`) only as part of its own build / install step, and removes its system-temp scratch folder on exit - read-only files too (`chmod -R u+w` before `rm -rf`: Go's module cache is read-only)
|
|
140
140
|
8. **Print where you are before you `cd`.** `echo "Moving to: $DIR"` saves an hour of debugging when paths are wrong. PowerShell: `Write-Host "Moving to: $DIR"`
|
|
141
141
|
|
|
142
142
|
## 1. `run_unittests_<lang>` — copy into the host, then run unit tests there
|
|
@@ -120,14 +120,14 @@ The coding agent reads the directives from the ***plain and the shapes from the
|
|
|
120
120
|
|
|
121
121
|
Embedded integrations are tested **inside the host codebase itself**. A module's code and unit tests live in `plain_modules/<module>/code`; its conformance tests live in one folder, `plain_modules/<module>/tests` — the module's whole conformance suite. turri runs two self-contained scripts on the person's machine, once per check: `run_unittests_<lang>.sh <build_folder>` decides the unit tests, and `run_conformance_tests_<lang>.sh <build_folder> <conformance_tests_folder>` (absolute paths) runs the whole conformance suite at once and its exit code decides the conformance tests. There is no prepare-environment script.
|
|
122
122
|
|
|
123
|
-
Both scripts copy the coding agent's output (`$1`, i.e. `plain_modules/<module>/code/`) into the host's source tree at the module's package path, then compile / test the host project in place. The conformance script also uses a scratch folder in the system temp directory (
|
|
123
|
+
Both scripts copy the coding agent's output (`$1`, i.e. `plain_modules/<module>/code/`) into the host's source tree at the module's package path, then compile / test the host project in place. The conformance script also uses a scratch folder of its own in the system temp directory (`mktemp -d "/tmp/<lang>_conformance.XXXXXX"` - never a fixed name, which two runs at once would share), because the conformance suite is a separate project that consumes the host build as a dependency.
|
|
124
124
|
|
|
125
125
|
This matters because the integration's generated code references host symbols by their full import path (e.g. `from host_project.integrations.base import IntegrationContract`). Those imports only resolve cleanly when the test process is rooted in the host's package layout — anything else creates path edge cases that bite later in conformance failures.
|
|
126
126
|
|
|
127
127
|
See [`integration-embedded-testing.md`](integration-embedded-testing.md) for the full per-script contract (arg validation, exit codes, idempotency, output parsing, pass criteria, cross-cutting rules). The summary that belongs in *this* file:
|
|
128
128
|
|
|
129
129
|
- **`run_unittests_<lang>`** copies `$1` into the host's source tree at the module's package path, then runs the module's unit tests + lint scoped to the module's package
|
|
130
|
-
- **`run_conformance_tests_<lang>`** makes the same copy of `$1` into the host, cleans the host's build-output directory, and runs the host's install / build (e.g. `mvn clean install -DskipTests`) so the conformance project resolves this build from the local dependency cache; then it copies `$2` (the conformance-tests folder) into
|
|
130
|
+
- **`run_conformance_tests_<lang>`** makes the same copy of `$1` into the host, cleans the host's build-output directory, and runs the host's install / build (e.g. `mvn clean install -DskipTests`) so the conformance project resolves this build from the local dependency cache; then it copies `$2` (the conformance-tests folder) into its scratch folder (`mktemp -d "/tmp/<lang>_conformance.XXXXXX"`), `cd`s in, builds the conformance project, and runs the whole suite
|
|
131
131
|
|
|
132
132
|
### Invariants the scripts must enforce
|
|
133
133
|
|
|
@@ -149,7 +149,7 @@ Before declaring an embedded integration done, in addition to the shared checkli
|
|
|
149
149
|
- [ ] The stack decisions are transcribed verbatim from the host (no independent stack choices)
|
|
150
150
|
- [ ] Host-package version pins are copied into `***implementation reqs***`
|
|
151
151
|
- [ ] `run_unittests` copies `$1` into the host's source tree at the module's package path and invokes the host's test runner scoped to the module's package
|
|
152
|
-
- [ ] `run_conformance_tests` makes the same copy of `$1` into the host, cleans the host's build-output directory, runs the host's install / build so the conformance suite resolves the integration from the local dependency cache, then copies `$2` into
|
|
152
|
+
- [ ] `run_conformance_tests` makes the same copy of `$1` into the host, cleans the host's build-output directory, runs the host's install / build so the conformance suite resolves the integration from the local dependency cache, then copies `$2` into a scratch folder of its own (`mktemp -d "/tmp/<lang>_conformance.XXXXXX"`), `cd`s in, builds the conformance project, and runs the whole suite
|
|
153
153
|
- [ ] There is no `prepare_environment_<lang>` script; each test script is self-contained
|
|
154
154
|
- [ ] Host codebase root is read from a named env var (default value documented in each script's usage) — never hardcoded; the env var name is captured in the integration's configuration concept
|
|
155
155
|
- [ ] `***implementation reqs***` declares **everything about `:UnitTests:`** — integration source path, `:UnitTests:` source path, `:UnitTests:` package, framework + conventions, lint / static-analysis gate — per [`integration-embedded-testing.md`](integration-embedded-testing.md)
|
|
@@ -66,7 +66,7 @@ A PowerShell (`.ps1`) copy is optional and only for people who run the script by
|
|
|
66
66
|
- PowerShell: `if (-not [System.IO.Path]::IsPathRooted($ConformanceTestsFolder)) { $ConformanceTestsFolder = Join-Path (Get-Location) $ConformanceTestsFolder }`
|
|
67
67
|
|
|
68
68
|
Never concatenate `$current_dir/$2` at the point of use — with an absolute `$2` that produces a doubled path (`/project//abs/path/...`), the classic symptom being `ImportError: Start directory is not importable` pointing at a path that contains the project root twice.
|
|
69
|
-
4. **Working directory setup.**
|
|
69
|
+
4. **Working directory setup.** Make a working folder of the run's own at `<temp>/<lang>_<basename>`, new each run: `WORKING_FOLDER="$(mktemp -d "/tmp/<lang>_$(basename "$1").XXXXXX")"` in Bash, `Join-Path ([System.IO.Path]::GetTempPath()) "<lang>_$(Split-Path $BuildFolder -Leaf).$([System.IO.Path]::GetRandomFileName())"` created with `New-Item -ItemType Directory` in PowerShell. Never a fixed name: two runs at once - two projects, or two pulses - would share it, and one wipe the other's. Register cleanup so the folder is removed when the script exits, whatever the toolchain left in it read-only - `trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT` in Bash, `Remove-Item -Recurse -Force` in the `finally` block in PowerShell. This folder — and **only** this folder — is where every subsequent write must land. 4b. **Refuse conformance tests in the build folder.** Conformance and acceptance tests live in the conformance tests folder (`$2`) and nowhere else. Before anything is staged, look for them in `$1`: any file carrying a conformance or acceptance label (`conformance tests of <module>:<func-id>`, `conformance scenario <scenario-id> of <module>:<func-id>`, `acceptance scenario <scenario-id> of <module>:<func-id>`), and any test file under a folder or name that says conformance or acceptance. Found any: print each path, say they belong in the conformance tests folder, and exit `1`. See [Tests in the build folder](#tests-in-the-build-folder).
|
|
70
70
|
5. **Copy the build.** Recursively copy everything from `<build_folder>` (`$1`) into the working folder. **Do not** copy the conformance tests — they stay where they are. After this step both `$1` (build folder) and `$2` (conformance tests folder) are treated as **read-only** for the rest of the script.
|
|
71
71
|
6. **Enter the working directory.** `cd` / `Set-Location` into `<temp>/<lang>_<basename>`. If that fails, exit with code `69`. All remaining steps run from inside the working folder; they must never write back to `$1` or `$2`.
|
|
72
72
|
7. **Install dependencies into an isolated environment inside `<temp>/<lang>_<basename>`.** Set up a per-working-folder dependency location (a Python venv at `./.venv`, a local `./node_modules`, a project-scoped Maven repo at `./.m2`, etc.) and install/resolve all dependencies into it. **Never** install into the source build folder (`$1`), the conformance tests folder (`$2`), the user's global cache (`~/.m2`, system-wide `pip`, `~/.cargo`, `~/.npm`, ...), or anywhere outside `<temp>/<lang>_<basename>`. If the install command fails, propagate its exit code immediately and **do not** proceed to step 8. See [Dependency isolation](#dependency-isolation). 7b. **Static checks of the conformance tests.** Once the build and the test libraries are installed - so the tests resolve against them as they do when they run - check **the conformance tests in `$CONFORMANCE_TESTS_FOLDER`, and only them**: the formatter in check mode, the linter, and the type checker where the language has one apart from its compiler. See [Static checks of the tests](#static-checks-of-the-tests). Run every check, even after one fails, print each one's whole output, remember whether any failed - and go on to step 8 whatever they said, so one run reports both.
|
|
@@ -151,7 +151,7 @@ Shared across both shell flavors:
|
|
|
151
151
|
- `80` — the suite passed and only the static checks of the tests failed (step 7b).
|
|
152
152
|
- Any other non-zero code — propagated from the underlying test command.
|
|
153
153
|
- **Working folder naming:** `<temp>/<lang>_<basename>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...) and the **basename** of the *first* argument (the build folder — `$(basename "$1")` / `Split-Path $BuildFolder -Leaf`), never the conformance tests folder and never the raw argument (it may be absolute; concatenating it produces broken doubled paths). All dependency installs, build outputs, caches, test runner artifacts, and the test invocation itself live inside this folder. Nothing the script does should touch `$1` after step 5, or `$2` at any point.
|
|
154
|
-
- **Cleanup ownership:** the script owns its working folder and removes it on exit, success and failure alike (`trap 'rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`).
|
|
154
|
+
- **Cleanup ownership:** the script owns its working folder - one `mktemp -d` made for this run, never a fixed name another run could share - and removes it on exit, success and failure alike, read-only files and all (`trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`).
|
|
155
155
|
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a `turri` regeneration and a green/red conformance result; when it fails, the only forensic evidence anyone has is its stdout/stderr. Treat the script like a production runbook, not a quiet helper. Concretely:
|
|
156
156
|
- **Announce every step before doing it**, with the exact value of every variable involved — the resolved build folder, the resolved conformance-tests folder, the working folder, the language, the toolchain version detected, the isolation root being set up, and the test command about to run. "Running tests" alone is useless; "Running `python -m unittest discover -b -s /abs/path/to/tests` from working folder `/tmp/python_build/` with venv activated at `./.venv` (Python 3.11.6)" is triage-ready.
|
|
157
157
|
- **Echo every non-trivial command before executing it.** In Bash, use `set -x` for the body of the script (or `echo "+ <cmd>"` immediately before each call); in PowerShell, set `$VerbosePreference = 'Continue'` and use `Write-Verbose` / `Write-Host` to print each command line with its arguments.
|
|
@@ -172,7 +172,7 @@ The dependency environment must live **inside** `$WORKING_FOLDER` so the test ru
|
|
|
172
172
|
| Python | `venv` at `./.venv` | `"$PYTHON" -m venv .venv && "$VENV_BIN/python" -m pip install -r requirements.txt` - `$VENV_BIN` is `.venv/bin`, or `.venv/Scripts` on Windows | `"$VENV_BIN/python" -m unittest discover -b -s "$CONFORMANCE_TESTS_FOLDER"` (or `"$VENV_BIN/pytest" "$CONFORMANCE_TESTS_FOLDER"`) |
|
|
173
173
|
| Node.js | local `./node_modules` (default) | `npm ci` (preferred) or `npm install` | `npx jest --rootDir "$CONFORMANCE_TESTS_FOLDER"` |
|
|
174
174
|
| Java | project-scoped Maven repo at `./.m2` | `mvn -Dmaven.repo.local=./.m2 install -DskipTests` (build + install artifact so the test pom can resolve it) | `mvn -f "$CONFORMANCE_TESTS_FOLDER/pom.xml" -Dmaven.repo.local="$(pwd)/.m2" test` |
|
|
175
|
-
| Go | module cache at `./.gocache
|
|
175
|
+
| Go | module cache at `./.gocache`, build cache at `./.gobuildcache`, the module cache written writable | `GOMODCACHE="$PWD/.gocache" GOCACHE="$PWD/.gobuildcache" GOFLAGS=-modcacherw go mod download` (optional pre-warm) | `GOMODCACHE="$PWD/.gocache" GOCACHE="$PWD/.gobuildcache" GOFLAGS=-modcacherw go test "$CONFORMANCE_TESTS_FOLDER/..."` |
|
|
176
176
|
| Rust | cargo home at `./.cargo` | `CARGO_HOME="$PWD/.cargo" cargo fetch` (optional pre-warm) | `CARGO_HOME="$PWD/.cargo" cargo test --manifest-path "$CONFORMANCE_TESTS_FOLDER/Cargo.toml"` |
|
|
177
177
|
|
|
178
178
|
Notes:
|
|
@@ -181,6 +181,7 @@ Notes:
|
|
|
181
181
|
- **Always pass the isolation flag/env var to both the install command and the test command.** They must agree on where deps live, otherwise the test command will silently fall back to the global cache **or** (worse) write into `$1` / `$2`.
|
|
182
182
|
- **Python is the only ecosystem where the venv is mandatory** to satisfy "into a virtual environment" literally. The others use language-native equivalents that achieve the same isolation.
|
|
183
183
|
- **Propagate the install exit code immediately.** In Bash: `<install cmd> || exit $?`. In PowerShell: check `$LASTEXITCODE` and `exit $LASTEXITCODE` if non-zero.
|
|
184
|
+
- **A cache the toolchain writes read-only must still be removed by the cleanup.** Go's module cache is read-only unless `GOFLAGS=-modcacherw` is set: a plain `rm -rf` of it fails with `Permission denied` and leaves the folder behind. Set the toolchain's own switch where it has one, and make the folder writable before removing it whatever the toolchain (`chmod -R u+w`, step 4).
|
|
184
185
|
- **Time the dependency setup** with bash's own `SECONDS` (`SECONDS=0` before, `$SECONDS` after) / `Get-Date` (PowerShell) and print `"Requirements setup completed in X seconds"`.
|
|
185
186
|
|
|
186
187
|
### Bash specifics
|
|
@@ -234,7 +235,8 @@ The harness never runs `.ps1` scripts. These notes apply only to an optional cop
|
|
|
234
235
|
- **Don't skip the "no tests discovered" check.** A conformance suite that finds zero tests and exits `0` is the worst possible failure mode — it looks like success.
|
|
235
236
|
- **Don't skip the toolchain check**, even when "everyone has it installed" — exit code `69` is what the calling system relies on to detect a missing runtime.
|
|
236
237
|
- **Don't reuse the source folder in place.** Always copy into `<temp>/<lang>_<basename>` first; turri relies on this isolation.
|
|
237
|
-
- **Don't skip cleanup.** Register the `trap` / `finally` removal of the working folder right after creating it, so it is removed on success and failure alike.
|
|
238
|
+
- **Don't skip cleanup.** Register the `trap` / `finally` removal of the working folder right after creating it, so it is removed on success and failure alike - read-only files too: a cleanup that fails with `Permission denied` on Go's module cache leaves the folder behind.
|
|
239
|
+
- **Don't use a fixed working folder** (`/tmp/go_code`). Two runs at once - two projects, two pulses - would share it, each wiping the other's build. `mktemp -d` makes one of the run's own.
|
|
238
240
|
- **Don't change the exit-code contract.** Other parts of the system branch on `69`, `1` and `80` specifically — and these codes must be identical between the Bash script and any PowerShell copy.
|
|
239
241
|
- **Don't check the tests on their own, or the code with them.** The checks run after the install, against what the tests run with, and report the tests' findings alone.
|
|
240
242
|
- **Don't let the tests' own configuration decide the checks.** The flags and the profile are the script's; a config file in `$2` is the conformance agent's to write.
|
package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh
CHANGED
|
@@ -48,20 +48,25 @@ CONFORMANCE_TESTS_SOURCE="$(cd "$2" 2>/dev/null && pwd)" || {
|
|
|
48
48
|
|
|
49
49
|
find "$CONFORMANCE_TESTS_SOURCE" -type f
|
|
50
50
|
|
|
51
|
-
# Working folders
|
|
52
|
-
# paths, so only their basenames are
|
|
53
|
-
JAVA_BUILD_SUBFOLDER="/tmp/java_$(basename "$1")"
|
|
54
|
-
|
|
51
|
+
# Working folders of this run's own in the system temp directory - never fixed names, which two runs at once (two
|
|
52
|
+
# projects, two pulses) would share. $1 and $2 may be absolute paths, so only their basenames are in the names.
|
|
53
|
+
JAVA_BUILD_SUBFOLDER="$(mktemp -d "/tmp/java_$(basename "$1").XXXXXX")" || {
|
|
54
|
+
printf "Error: could not create a working folder in /tmp.\n"
|
|
55
|
+
exit 2
|
|
56
|
+
}
|
|
57
|
+
CONFORMANCE_TESTS_FOLDER="$(mktemp -d "/tmp/java_conformance_$(basename "$2").XXXXXX")" || {
|
|
58
|
+
rm -rf "$JAVA_BUILD_SUBFOLDER"
|
|
59
|
+
printf "Error: could not create a working folder in /tmp.\n"
|
|
60
|
+
exit 2
|
|
61
|
+
}
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
# Removed as the script exits, whatever a toolchain left in them read-only.
|
|
64
|
+
trap 'chmod -R u+w "$JAVA_BUILD_SUBFOLDER" "$CONFORMANCE_TESTS_FOLDER" 2>/dev/null; rm -rf "$JAVA_BUILD_SUBFOLDER" "$CONFORMANCE_TESTS_FOLDER"' EXIT
|
|
57
65
|
|
|
58
66
|
if [ "${VERBOSE:-}" -eq 1 ] 2>/dev/null; then
|
|
59
67
|
printf "Preparing Java build subfolder: $JAVA_BUILD_SUBFOLDER\n"
|
|
60
68
|
fi
|
|
61
69
|
|
|
62
|
-
rm -rf "$JAVA_BUILD_SUBFOLDER"
|
|
63
|
-
mkdir -p "$JAVA_BUILD_SUBFOLDER"
|
|
64
|
-
|
|
65
70
|
# Conformance tests live in the conformance tests folder and nowhere else. One in the
|
|
66
71
|
# build folder is in the wrong place: nothing would run it as part of the suite. Refuse.
|
|
67
72
|
MISPLACED=$( (grep -rlE --exclude=".turri*" --exclude-dir=target --exclude-dir=.m2 \
|
|
@@ -99,9 +104,6 @@ cd "$current_dir" 2>/dev/null
|
|
|
99
104
|
printf "Moved to $current_dir...\n"
|
|
100
105
|
printf "Preparing Java conformance tests subfolder: $CONFORMANCE_TESTS_FOLDER\n"
|
|
101
106
|
|
|
102
|
-
rm -rf "$CONFORMANCE_TESTS_FOLDER"
|
|
103
|
-
mkdir -p "$CONFORMANCE_TESTS_FOLDER"
|
|
104
|
-
|
|
105
107
|
cp -R "$CONFORMANCE_TESTS_SOURCE"/* "$CONFORMANCE_TESTS_FOLDER"
|
|
106
108
|
printf "Copied from $CONFORMANCE_TESTS_SOURCE to $CONFORMANCE_TESTS_FOLDER...\n"
|
|
107
109
|
|
package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh
CHANGED
|
@@ -50,19 +50,20 @@ if [ -n "$MISPLACED" ]; then
|
|
|
50
50
|
exit 1
|
|
51
51
|
fi
|
|
52
52
|
|
|
53
|
-
#
|
|
54
|
-
# path, so only its basename is
|
|
55
|
-
PYTHON_BUILD_SUBFOLDER="/tmp/python_$(basename "$1")"
|
|
53
|
+
# A working folder of this run's own in the system temp directory - never a fixed name, which two runs at once (two
|
|
54
|
+
# projects, two pulses) would share. $1 may be an absolute path, so only its basename is in the name.
|
|
55
|
+
PYTHON_BUILD_SUBFOLDER="$(mktemp -d "/tmp/python_$(basename "$1").XXXXXX")" || {
|
|
56
|
+
printf "Error: could not create a working folder in /tmp.\n"
|
|
57
|
+
exit $UNRECOVERABLE_ERROR_EXIT_CODE
|
|
58
|
+
}
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
# Removed as the script exits, whatever a toolchain left in it read-only.
|
|
61
|
+
trap 'chmod -R u+w "$PYTHON_BUILD_SUBFOLDER" 2>/dev/null; rm -rf "$PYTHON_BUILD_SUBFOLDER"' EXIT
|
|
58
62
|
|
|
59
63
|
if [ "${VERBOSE:-}" -eq 1 ] 2>/dev/null; then
|
|
60
64
|
printf "Preparing Python build subfolder: $PYTHON_BUILD_SUBFOLDER\n"
|
|
61
65
|
fi
|
|
62
66
|
|
|
63
|
-
rm -rf "$PYTHON_BUILD_SUBFOLDER"
|
|
64
|
-
mkdir -p "$PYTHON_BUILD_SUBFOLDER"
|
|
65
|
-
|
|
66
67
|
cp -R "$1"/* "$PYTHON_BUILD_SUBFOLDER"
|
|
67
68
|
|
|
68
69
|
# Move to the subfolder
|
|
@@ -36,7 +36,7 @@ Every testing script must implement these steps **in this order**:
|
|
|
36
36
|
|
|
37
37
|
1. **Toolchain check.** Verify that the required language runtime / build tool (and the required version, if any) is installed. If not, print an error and exit with code `69`.
|
|
38
38
|
2. **Argument validation.** Require exactly one positional argument: the source build folder. If missing, print usage and exit with code `1`. turri passes this argument as an **absolute path** (older harnesses passed a relative one; on Windows it is written with forward slashes, `C:/Users/...`) — the script must work with both, which is why the working-folder name in step 3 is built from the argument's *basename*, never from the raw argument.
|
|
39
|
-
3. **Working directory setup.**
|
|
39
|
+
3. **Working directory setup.** Make a working folder of the run's own in the **system temp directory**, new each run: `WORKING_FOLDER="$(mktemp -d "/tmp/<lang>_$(basename "$1").XXXXXX")"` in Bash (exit `2` if it cannot be made), `Join-Path ([System.IO.Path]::GetTempPath()) "<lang>_$(Split-Path $BuildFolder -Leaf).$([System.IO.Path]::GetRandomFileName())"` created with `New-Item -ItemType Directory` in PowerShell (written as `<temp>/<lang>_<basename>` below). Never a fixed name: two runs at once - two projects, or two pulses - would share it, and one wipe the other's. Register cleanup so the folder is removed when the script exits, whatever the toolchain left in it read-only - `trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT` in Bash, a `Remove-Item -Recurse -Force` in the `finally` block in PowerShell. This folder — and **only** this folder — is where every subsequent write must land.
|
|
40
40
|
4. **Copy the build.** Recursively copy everything from the source folder into the working folder. After this step the source folder (`$1`) is treated as **read-only** for the rest of the script.
|
|
41
41
|
5. **Enter the working directory.** `cd` / `Set-Location` into `<temp>/<lang>_<basename>`. If that fails, exit with code `2`. All remaining steps run from inside the working folder; they must never write back to the source build folder.
|
|
42
42
|
6. **Install dependencies into an isolated environment inside `<temp>/<lang>_<basename>`.** Set up a per-working-folder dependency location (a Python venv at `./.venv`, a local `./node_modules`, a project-scoped Maven repo at `./.m2`, etc.) and install/resolve all dependencies into it. **Never** install into the source build folder, the user's global cache (`~/.m2`, system-wide `pip`, `~/.cargo`, `~/.npm`, ...), or anywhere outside `<temp>/<lang>_<basename>`. If the install command fails, propagate its exit code immediately and **do not** proceed to step 7. See [Dependency isolation](#dependency-isolation) for per-language specifics.
|
|
@@ -66,8 +66,8 @@ Shared across both shell flavors:
|
|
|
66
66
|
- `69` — required toolchain / runtime is not installed - a static checker the person installs on the machine (not the project) included.
|
|
67
67
|
- `80` — the tests passed and only the static checks failed. turri tells the coding agent so, and says it was the static checks when the work stops there.
|
|
68
68
|
- Any other non-zero code — propagated from the underlying test command.
|
|
69
|
-
- **Working folder naming:** `<temp>/<lang>_<basename>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...)
|
|
70
|
-
- **Cleanup on exit:** the working folder is temporary — remove it when the script exits, on success and failure alike (`trap 'rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`). No leftover build folders may accumulate in the temp directory or the user's project.
|
|
69
|
+
- **Working folder naming:** `<temp>/<lang>_<basename>.<random>` — the system temp directory (`/tmp` in Bash, `[System.IO.Path]::GetTempPath()` in PowerShell) plus a short identifier for the language (`java`, `python`, `node`, `go`, `rust`, ...), the **basename** of the build-folder argument (`$(basename "$1")` / `Split-Path $BuildFolder -Leaf`) and a suffix of the run's own - `mktemp -d` makes it, so no other run, of this project or another, ever shares it. Never embed the raw argument in the path — it may be absolute, and concatenating it produces broken doubled paths. All dependency installs, build outputs, caches, and the test run itself live inside this folder. Nothing the script does should touch the source build folder after step 4.
|
|
70
|
+
- **Cleanup on exit:** the working folder is temporary — remove it when the script exits, on success and failure alike, read-only files and all (`trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT` in Bash; `Remove-Item -Recurse -Force` in the PowerShell `finally` block, after `Pop-Location`). No leftover build folders may accumulate in the temp directory or the user's project.
|
|
71
71
|
- **Logging — be as verbose as possible.** The script is the only thing the operator sees between a `turri` regeneration and a green/red test result; when it fails, the only forensic evidence anyone has is its stdout/stderr. Treat the script like a production runbook, not a quiet helper. Concretely:
|
|
72
72
|
- **Announce every step before doing it**, with the exact value of every variable involved — the resolved source folder, the working folder, the language, the toolchain version detected, the isolation root, the dependency-manifest path, the test command about to run. "Installing dependencies" alone is useless; "Installing dependencies from `./requirements.txt` into venv `./.venv` (Python 3.11.6 at `/usr/local/bin/python3`)" is triage-ready.
|
|
73
73
|
- **Echo every non-trivial command before executing it.** In Bash, use `set -x` for the body of the script (or `echo "+ <cmd>"` immediately before each call); in PowerShell, set `$VerbosePreference = 'Continue'` and use `Write-Verbose` / `Write-Host` to print each command line with its arguments.
|
|
@@ -87,7 +87,7 @@ The dependency environment must live **inside** `$WORKING_FOLDER` so the test ru
|
|
|
87
87
|
| Python | `venv` at `./.venv` | `"$PYTHON" -m venv .venv && "$VENV_BIN/python" -m pip install -r requirements.txt` (or `pyproject.toml` / `uv sync` / `poetry install`) - `$VENV_BIN` is `.venv/bin`, or `.venv/Scripts` on Windows | `"$VENV_BIN/pytest"` (or `"$VENV_BIN/python" -m pytest`) |
|
|
88
88
|
| Node.js | local `./node_modules` (default) | `npm ci` (preferred) or `npm install` | `npm test` |
|
|
89
89
|
| Java | project-scoped Maven repo at `./.m2` | `mvn -Dmaven.repo.local=./.m2 dependency:resolve` (optional pre-warm) | `mvn -Dmaven.repo.local=./.m2 test` |
|
|
90
|
-
| Go | module cache at `./.gocache
|
|
90
|
+
| Go | module cache at `./.gocache`, build cache at `./.gobuildcache`, the module cache written writable | `GOMODCACHE="$PWD/.gocache" GOCACHE="$PWD/.gobuildcache" GOFLAGS=-modcacherw go mod download` (optional pre-warm) | `GOMODCACHE="$PWD/.gocache" GOCACHE="$PWD/.gobuildcache" GOFLAGS=-modcacherw go test ./...` |
|
|
91
91
|
| Rust | cargo home at `./.cargo` | `CARGO_HOME="$PWD/.cargo" cargo fetch` (optional pre-warm) | `CARGO_HOME="$PWD/.cargo" cargo test` |
|
|
92
92
|
|
|
93
93
|
Notes:
|
|
@@ -97,6 +97,7 @@ Notes:
|
|
|
97
97
|
- **Python is the only ecosystem where the venv is mandatory** to satisfy "into a virtual environment" literally. The others use language-native equivalents that achieve the same isolation.
|
|
98
98
|
- **Pre-warming is optional for Java/Go/Rust** — their test commands will fetch deps on demand. Doing it as a separate step makes failures easier to diagnose and gives a clean "install failed vs test failed" signal.
|
|
99
99
|
- **Don't activate the venv** in Bash via `source .venv/bin/activate` — call `"$VENV_BIN/<tool>"` directly, `$VENV_BIN` being `.venv/bin`, or `.venv/Scripts` on Windows. It's more portable and avoids subshell weirdness. In PowerShell, use `& .\.venv\Scripts\<tool>.exe` similarly.
|
|
100
|
+
- **A cache the toolchain writes read-only must still be removed by the cleanup.** Go's module cache is read-only unless `GOFLAGS=-modcacherw` is set: a plain `rm -rf` of it fails with `Permission denied`, the folder is left behind, and the next run that reuses it fails. Set the toolchain's own switch where it has one (`-modcacherw`), and make the folder writable before removing it in the cleanup whatever the toolchain (`chmod -R u+w`, step 3). `go clean -modcache` empties Go's cache too, with the same `GOMODCACHE`.
|
|
100
101
|
- **Propagate the install exit code immediately.** In Bash: `<install cmd> || exit $?`. In PowerShell: check `$LASTEXITCODE` and `exit $LASTEXITCODE` if non-zero.
|
|
101
102
|
|
|
102
103
|
### Static checks
|
|
@@ -159,7 +160,8 @@ Notes:
|
|
|
159
160
|
- **(Hard mistake) Don't build any path by concatenating the raw build-folder argument.** `$1` arrives from turri as an absolute path. Patterns like `WORKING_FOLDER=.tmp/$1`, `WORKING_FOLDER=<lang>_$1`, or `"$current_dir/$1"` silently produce doubled paths (`/project//abs/path/...`) — the classic symptom is an `ImportError: Start directory is not importable` or "folder does not exist" pointing at a path that contains the project root twice. Always take `$(basename "$1")` / `Split-Path -Leaf`.
|
|
160
161
|
- Don't skip the toolchain check, even when "everyone has it installed" — exit code `69` is what the calling system relies on to detect a missing runtime.
|
|
161
162
|
- Don't reuse the source folder in place. Always copy into `<temp>/<lang>_<basename>` first; turri relies on this isolation.
|
|
162
|
-
- Don't leave the working folder behind. Register the cleanup (`trap … EXIT` / `finally`) before the first write so even an early failure removes it.
|
|
163
|
+
- Don't leave the working folder behind. Register the cleanup (`trap … EXIT` / `finally`) before the first write so even an early failure removes it - and make it remove what the toolchain wrote read-only (Go's module cache): a cleanup that fails with `Permission denied` leaves the folder behind.
|
|
164
|
+
- **Don't use a fixed working folder** (`/tmp/go_code`). Two runs at once - two projects, two pulses - would share it, each wiping the other's build. `mktemp -d` makes one of the run's own.
|
|
163
165
|
- Don't change the exit-code contract. Other parts of the system branch on `1`, `2`, `69` and `80` specifically — and these codes must be identical between the Bash and PowerShell variants.
|
|
164
166
|
- Don't stop at the first failing check, and don't skip the tests because a check failed. Every check and the tests run each time, so one run tells the agent everything; the exit code says which failed.
|
|
165
167
|
- Don't exit `80` when the tests failed. `80` means the tests passed and only the checks did not; failing tests keep their own exit code, the checks' findings printed above them.
|
|
@@ -27,20 +27,16 @@ if [ -z "$1" ]; then
|
|
|
27
27
|
exit 1
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
|
-
#
|
|
31
|
-
# path, so only its basename is
|
|
32
|
-
WORKING_FOLDER="/tmp/java_$(basename "$1")"
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
# A working folder of this run's own in the system temp directory - never a fixed name, which two runs at once (two
|
|
31
|
+
# projects, two pulses) would share. $1 may be an absolute path, so only its basename is in the name.
|
|
32
|
+
WORKING_FOLDER="$(mktemp -d "/tmp/java_$(basename "$1").XXXXXX")" || {
|
|
33
|
+
echo "Error: could not create a working folder in /tmp."
|
|
34
|
+
exit 2
|
|
35
|
+
}
|
|
36
|
+
echo "Working folder: $WORKING_FOLDER"
|
|
35
37
|
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
# delete everything in the subfolder
|
|
39
|
-
rm -rf "$WORKING_FOLDER"/*
|
|
40
|
-
else
|
|
41
|
-
echo "Subfolder '$WORKING_FOLDER' does not exist. Creating it now..."
|
|
42
|
-
mkdir -p "$WORKING_FOLDER"
|
|
43
|
-
fi
|
|
38
|
+
# Removed as the script exits, whatever a toolchain left in it read-only.
|
|
39
|
+
trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT
|
|
44
40
|
|
|
45
41
|
|
|
46
42
|
# copy all folders and files from the build folder to the subfolder
|
|
@@ -35,7 +35,7 @@ echo "Build folder (read only): $SOURCE"
|
|
|
35
35
|
echo "===== [3/8] Working folder ====="
|
|
36
36
|
# A folder of its own each run: runs side by side never share one.
|
|
37
37
|
WORKING_FOLDER="$(mktemp -d "/tmp/python_$(basename "$SOURCE").XXXXXX")" || { echo "Error: could not create a working folder in /tmp."; exit 2; }
|
|
38
|
-
trap 'rm -rf "$WORKING_FOLDER"' EXIT
|
|
38
|
+
trap 'chmod -R u+w "$WORKING_FOLDER" 2>/dev/null; rm -rf "$WORKING_FOLDER"' EXIT
|
|
39
39
|
echo "Working folder: $WORKING_FOLDER"
|
|
40
40
|
|
|
41
41
|
echo "===== [4/8] Copy the build ====="
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turri-dev/core",
|
|
3
|
-
"version": "0.1.1-next.
|
|
3
|
+
"version": "0.1.1-next.ad4aa8f",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "git+https://github.com/turri-oss/turri-core.git"
|
|
@@ -15,44 +16,29 @@
|
|
|
15
16
|
},
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
18
|
-
"turri-source": "./src/
|
|
19
|
-
"types": "./dist/
|
|
20
|
-
"import": "./dist/
|
|
21
|
-
},
|
|
22
|
-
"./host": {
|
|
23
|
-
"turri-source": "./src/host.ts",
|
|
24
|
-
"types": "./dist/host.d.ts",
|
|
25
|
-
"import": "./dist/host.js"
|
|
19
|
+
"turri-source": "./src/api/session.ts",
|
|
20
|
+
"types": "./dist/api/session.d.ts",
|
|
21
|
+
"import": "./dist/api/session.js"
|
|
26
22
|
},
|
|
27
23
|
"./plain": {
|
|
28
24
|
"turri-source": "./src/api/plain.ts",
|
|
29
25
|
"types": "./dist/api/plain.d.ts",
|
|
30
26
|
"import": "./dist/api/plain.js"
|
|
31
27
|
},
|
|
32
|
-
"./
|
|
33
|
-
"turri-source": "./src/api/
|
|
34
|
-
"types": "./dist/api/
|
|
35
|
-
"import": "./dist/api/
|
|
36
|
-
},
|
|
37
|
-
"./ledger": {
|
|
38
|
-
"turri-source": "./src/api/ledger.ts",
|
|
39
|
-
"types": "./dist/api/ledger.d.ts",
|
|
40
|
-
"import": "./dist/api/ledger.js"
|
|
41
|
-
},
|
|
42
|
-
"./terminal": {
|
|
43
|
-
"turri-source": "./src/api/terminal.ts",
|
|
44
|
-
"types": "./dist/api/terminal.d.ts",
|
|
45
|
-
"import": "./dist/api/terminal.js"
|
|
28
|
+
"./project": {
|
|
29
|
+
"turri-source": "./src/api/project.ts",
|
|
30
|
+
"types": "./dist/api/project.d.ts",
|
|
31
|
+
"import": "./dist/api/project.js"
|
|
46
32
|
},
|
|
47
|
-
"./
|
|
48
|
-
"turri-source": "./src/api/
|
|
49
|
-
"types": "./dist/api/
|
|
50
|
-
"import": "./dist/api/
|
|
33
|
+
"./models": {
|
|
34
|
+
"turri-source": "./src/api/models.ts",
|
|
35
|
+
"types": "./dist/api/models.d.ts",
|
|
36
|
+
"import": "./dist/api/models.js"
|
|
51
37
|
},
|
|
52
|
-
"./
|
|
53
|
-
"turri-source": "./src/api/
|
|
54
|
-
"types": "./dist/api/
|
|
55
|
-
"import": "./dist/api/
|
|
38
|
+
"./system": {
|
|
39
|
+
"turri-source": "./src/api/system.ts",
|
|
40
|
+
"types": "./dist/api/system.d.ts",
|
|
41
|
+
"import": "./dist/api/system.js"
|
|
56
42
|
},
|
|
57
43
|
"./package.json": "./package.json"
|
|
58
44
|
},
|
|
@@ -102,6 +88,7 @@
|
|
|
102
88
|
"stdlib",
|
|
103
89
|
"docs",
|
|
104
90
|
"README.md",
|
|
105
|
-
"LICENSE"
|
|
91
|
+
"LICENSE",
|
|
92
|
+
"CHANGELOG.md"
|
|
106
93
|
]
|
|
107
94
|
}
|
package/dist/api/commands.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type HeadlessOptions, type HeadlessView } from "../headless.ts";
|
|
2
|
-
export { moduleStates, type HeadlessView, type HeadlessEnd, type HeadlessResult } from "../headless.ts";
|
|
3
|
-
export { describeDrift, describeModules } from "../regenerate/loop.ts";
|
|
4
|
-
export { allChecks, asksModels, MARK, verdictOf } from "../setup.ts";
|
|
5
|
-
export { runCapture, CaptureError, DEFAULT_PARALLEL, type CaptureOptions, type CaptureResult } from "../capture/capture.ts";
|
|
6
|
-
export { runSkill, describeGates } from "../genome.ts";
|
|
7
|
-
export { discoverSkills } from "../skills.ts";
|
|
8
|
-
export { loadSkill } from "../skill.ts";
|
|
9
|
-
export { runAsk } from "../ask.ts";
|
|
10
|
-
export type { Decision, Reporter } from "../graph.ts";
|
|
11
|
-
export { skillRunDir, defaultBuildDir } from "../regenerate/paths.ts";
|
|
12
|
-
export { historyLog, historyShow } from "../regenerate/lineage.ts";
|
|
13
|
-
export { PACKAGE_ROOT, setTurriRoot, turriRoot, versionLine, themeFiles, extensionInstalledGlobally, themesInstalledGlobally } from "../environment.ts";
|
|
14
|
-
export { describeVersion } from "../turri-versions.ts";
|
|
15
|
-
export { applyBedrockRegion } from "../bedrock-region.ts";
|
|
16
|
-
export { bedrockMakerOf, bedrockRegionOf, vendorOf, priced, type Asked, type Paint } from "../init-config.ts";
|
|
17
|
-
export { globalExtensionFile } from "../environment.ts";
|
|
18
|
-
export { dropNoise } from "../quiet.ts";
|
|
19
|
-
export { followLaunchedLogs, runningLaunched, stopLaunched } from "../regenerate/launch.ts";
|
|
20
|
-
export type HeadlessRun = HeadlessOptions & ({
|
|
21
|
-
work: "preview";
|
|
22
|
-
} | {
|
|
23
|
-
work: "regenerate";
|
|
24
|
-
again?: string[];
|
|
25
|
-
} | {
|
|
26
|
-
work: "fromScratch";
|
|
27
|
-
chain?: boolean;
|
|
28
|
-
} | {
|
|
29
|
-
work: "conform";
|
|
30
|
-
funcIds?: string[];
|
|
31
|
-
separately?: boolean;
|
|
32
|
-
fromScratch?: "module" | "chain";
|
|
33
|
-
});
|
|
34
|
-
/** Give the CLI's request to the loop. A preview can never take a path that starts a pulse. */
|
|
35
|
-
export declare function runHeadless(request: HeadlessRun, view: HeadlessView): Promise<import("../headless.ts").HeadlessResult>;
|
|
36
|
-
/** `turri drift` without a session, a model or any work started. */
|
|
37
|
-
export declare function readDrift(plainFile: string, cwd?: string): import("../regenerate/loop.ts").DriftReport[];
|
|
38
|
-
/** A standalone CLI launch. Its view owns the console, signals and how long to follow the logs. */
|
|
39
|
-
export declare function launchModule(plainFile: string, options?: {
|
|
40
|
-
cwd?: string;
|
|
41
|
-
inModule?: string;
|
|
42
|
-
guidance?: string;
|
|
43
|
-
model?: string;
|
|
44
|
-
onDelta?: (delta: string) => void;
|
|
45
|
-
}): Promise<import("../launch-track.ts").Launch>;
|