@turri-dev/cli 0.4.3-next.aea3ca1 → 0.4.3-next.fd01774
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -3
- package/dist/banner.js +248 -0
- package/dist/capture-cli.js +77 -0
- package/dist/capture-view.js +99 -0
- package/dist/chat-commands.js +9 -63
- package/dist/chat-models.js +17 -15
- package/dist/chat-tab-header.js +90 -0
- package/dist/chat-tabs.js +100 -0
- package/dist/chat-terminal.js +163 -54
- package/dist/chat-waiting.js +0 -20
- package/dist/cli-options.js +11 -7
- package/dist/cli-root.js +101 -0
- package/dist/cli.js +48 -36
- package/dist/conform-cli.js +4 -6
- package/dist/cultivate-cli.js +65 -97
- package/dist/doctor-cli.js +99 -0
- package/dist/drift-cli.js +2 -7
- package/dist/entry-renderers.js +107 -0
- package/dist/extension.js +14 -3211
- package/dist/init-config-cli.js +209 -0
- package/dist/launch-cli.js +55 -91
- package/dist/lineage-cli.js +2 -4
- package/dist/loop-cli.js +118 -233
- package/dist/panel-view.js +409 -0
- package/dist/parse-cli.js +5 -2
- package/dist/pi-launch.js +43 -13
- package/dist/pi-themes.js +21 -0
- package/dist/plain-code-blocks.js +56 -0
- package/dist/pointer-hover.js +48 -0
- package/dist/print-mode.js +20 -0
- package/dist/question-dialog.js +26 -3
- package/dist/quiet.js +7 -106
- package/dist/regenerate/diff-view.js +6 -87
- package/dist/regenerate/jobs-tree.js +7 -18
- package/dist/regenerate/side-panel.js +158 -22
- package/dist/regenerate/spec-map-view.js +25 -70
- package/dist/regenerate-cli.js +7 -11
- package/dist/reopen.js +80 -0
- package/dist/skill-progress.js +25 -0
- package/dist/skill-report.js +52 -0
- package/dist/terminal-marks.js +21 -0
- package/dist/terminal-notifications.js +219 -0
- package/dist/terminal-view.js +275 -0
- package/dist/turri-versions.js +64 -6
- package/docs/README.md +4 -2
- package/docs/capture.md +227 -0
- package/docs/chats.md +14 -10
- package/docs/claude-subscription.md +1 -1
- package/docs/config.md +23 -8
- package/docs/development.md +30 -61
- package/docs/headless.md +3 -1
- package/docs/hosting.md +3 -251
- package/docs/installation.md +5 -3
- package/docs/launch.md +3 -3
- package/docs/regenerating.md +1 -1
- package/docs/sandbox.md +4 -2
- package/docs/sentinel.md +13 -13
- package/docs/theming.md +3 -3
- package/docs/using.md +13 -5
- package/package.json +13 -31
- package/dist/ask.d.ts +0 -90
- package/dist/ask.js +0 -170
- package/dist/background-skills.d.ts +0 -53
- package/dist/background-skills.js +0 -121
- package/dist/bedrock-region.d.ts +0 -66
- package/dist/bedrock-region.js +0 -144
- package/dist/brand.d.ts +0 -13
- package/dist/btw.d.ts +0 -69
- package/dist/btw.js +0 -174
- package/dist/chat-commands.d.ts +0 -25
- package/dist/chat-idle.d.ts +0 -7
- package/dist/chat-idle.js +0 -20
- package/dist/chat-models.d.ts +0 -22
- package/dist/chat-records.d.ts +0 -50
- package/dist/chat-records.js +0 -107
- package/dist/chat-scope.d.ts +0 -14
- package/dist/chat-scope.js +0 -15
- package/dist/chat-skills.d.ts +0 -17
- package/dist/chat-skills.js +0 -18
- package/dist/chat-terminal.d.ts +0 -24
- package/dist/chat-ui.d.ts +0 -33
- package/dist/chat-waiting.d.ts +0 -67
- package/dist/chats.d.ts +0 -338
- package/dist/chats.js +0 -996
- package/dist/cli-options.d.ts +0 -24
- package/dist/cli.d.ts +0 -9
- package/dist/config-edit.d.ts +0 -83
- package/dist/config-edit.js +0 -390
- package/dist/config.d.ts +0 -415
- package/dist/config.js +0 -757
- package/dist/conform-cli.d.ts +0 -1
- package/dist/conformance-switch.d.ts +0 -25
- package/dist/conformance-switch.js +0 -86
- package/dist/cultivate-cli.d.ts +0 -1
- package/dist/doctor-tool.d.ts +0 -11
- package/dist/doctor-tool.js +0 -33
- package/dist/drift-cli.d.ts +0 -1
- package/dist/environment.d.ts +0 -37
- package/dist/environment.js +0 -109
- package/dist/extension.d.ts +0 -208
- package/dist/genome.d.ts +0 -77
- package/dist/genome.js +0 -288
- package/dist/graph.d.ts +0 -52
- package/dist/graph.js +0 -247
- package/dist/host-session.d.ts +0 -112
- package/dist/host-session.js +0 -103
- package/dist/host.d.ts +0 -40
- package/dist/host.js +0 -54
- package/dist/identity.d.ts +0 -7
- package/dist/identity.js +0 -74
- package/dist/init-config.d.ts +0 -169
- package/dist/init-config.js +0 -840
- package/dist/installed-providers.d.ts +0 -40
- package/dist/installed-providers.js +0 -98
- package/dist/jellyfish.d.ts +0 -40
- package/dist/judge.d.ts +0 -25
- package/dist/judge.js +0 -62
- package/dist/launch-agent.d.ts +0 -62
- package/dist/launch-agent.js +0 -339
- package/dist/launch-cli.d.ts +0 -1
- package/dist/launch-session.d.ts +0 -68
- package/dist/launch-session.js +0 -225
- package/dist/launch-tools.d.ts +0 -28
- package/dist/launch-tools.js +0 -72
- package/dist/launch-track.d.ts +0 -175
- package/dist/launch-track.js +0 -497
- package/dist/lineage-cli.d.ts +0 -1
- package/dist/loop-cli.d.ts +0 -35
- package/dist/loop-tools.d.ts +0 -103
- package/dist/loop-tools.js +0 -357
- package/dist/model-check.d.ts +0 -72
- package/dist/model-check.js +0 -162
- package/dist/module-report.d.ts +0 -9
- package/dist/new-project.d.ts +0 -5
- package/dist/new-project.js +0 -31
- package/dist/notice.d.ts +0 -115
- package/dist/notice.js +0 -61
- package/dist/parse-cli.d.ts +0 -1
- package/dist/parse-tool.d.ts +0 -9
- package/dist/parse-tool.js +0 -33
- package/dist/pi-launch.d.ts +0 -1
- package/dist/pi-settings.d.ts +0 -4
- package/dist/pi.d.ts +0 -248
- package/dist/pi.js +0 -889
- package/dist/picture-row.d.ts +0 -10
- package/dist/plain/check.d.ts +0 -63
- package/dist/plain/check.js +0 -236
- package/dist/plain/concepts.d.ts +0 -37
- package/dist/plain/concepts.js +0 -283
- package/dist/plain/cycles.d.ts +0 -21
- package/dist/plain/cycles.js +0 -190
- package/dist/plain/errors.d.ts +0 -26
- package/dist/plain/errors.js +0 -50
- package/dist/plain/files.d.ts +0 -47
- package/dist/plain/files.js +0 -161
- package/dist/plain/graph.d.ts +0 -107
- package/dist/plain/graph.js +0 -194
- package/dist/plain/highlight.d.ts +0 -43
- package/dist/plain/highlight.js +0 -196
- package/dist/plain/index.d.ts +0 -18
- package/dist/plain/index.js +0 -18
- package/dist/plain/liquid.d.ts +0 -22
- package/dist/plain/liquid.js +0 -124
- package/dist/plain/markdown.d.ts +0 -103
- package/dist/plain/markdown.js +0 -330
- package/dist/plain/module-concepts.d.ts +0 -32
- package/dist/plain/module-concepts.js +0 -80
- package/dist/plain/parser.d.ts +0 -163
- package/dist/plain/parser.js +0 -930
- package/dist/plain/plain.tmLanguage.json +0 -150
- package/dist/plain/project.d.ts +0 -48
- package/dist/plain/project.js +0 -155
- package/dist/plain/spec.d.ts +0 -152
- package/dist/plain/spec.js +0 -265
- package/dist/plain/stdlib.d.ts +0 -16
- package/dist/plain/stdlib.js +0 -48
- package/dist/plain/test-plain-file.d.ts +0 -59
- package/dist/plain/test-plain-file.js +0 -232
- package/dist/plain-files.d.ts +0 -21
- package/dist/plain-files.js +0 -156
- package/dist/question-dialog.d.ts +0 -55
- package/dist/questioning.d.ts +0 -55
- package/dist/questioning.js +0 -109
- package/dist/quiet.d.ts +0 -34
- package/dist/regenerate/activity.d.ts +0 -227
- package/dist/regenerate/activity.js +0 -250
- package/dist/regenerate/agent-env.d.ts +0 -51
- package/dist/regenerate/agent-env.js +0 -311
- package/dist/regenerate/agent-shell.d.ts +0 -54
- package/dist/regenerate/agent-shell.js +0 -121
- package/dist/regenerate/arbiter.d.ts +0 -68
- package/dist/regenerate/arbiter.js +0 -133
- package/dist/regenerate/audit.d.ts +0 -69
- package/dist/regenerate/audit.js +0 -212
- package/dist/regenerate/base-folder.d.ts +0 -70
- package/dist/regenerate/base-folder.js +0 -186
- package/dist/regenerate/cases.d.ts +0 -12
- package/dist/regenerate/cases.js +0 -149
- package/dist/regenerate/change-view.d.ts +0 -23
- package/dist/regenerate/change-view.js +0 -153
- package/dist/regenerate/chunk-plan.d.ts +0 -217
- package/dist/regenerate/chunk-plan.js +0 -937
- package/dist/regenerate/codebase.d.ts +0 -21
- package/dist/regenerate/codebase.js +0 -75
- package/dist/regenerate/command-check.d.ts +0 -66
- package/dist/regenerate/command-check.js +0 -508
- package/dist/regenerate/compaction.d.ts +0 -13
- package/dist/regenerate/compaction.js +0 -20
- package/dist/regenerate/confine.d.ts +0 -69
- package/dist/regenerate/confine.js +0 -311
- package/dist/regenerate/conform.d.ts +0 -66
- package/dist/regenerate/conform.js +0 -132
- package/dist/regenerate/conformance-agents.d.ts +0 -388
- package/dist/regenerate/conformance-agents.js +0 -1162
- package/dist/regenerate/conformance.d.ts +0 -191
- package/dist/regenerate/conformance.js +0 -1035
- package/dist/regenerate/conversation-writes.d.ts +0 -10
- package/dist/regenerate/conversation-writes.js +0 -100
- package/dist/regenerate/credentials.d.ts +0 -18
- package/dist/regenerate/credentials.js +0 -88
- package/dist/regenerate/debug-log.d.ts +0 -56
- package/dist/regenerate/debug-log.js +0 -236
- package/dist/regenerate/debugger.d.ts +0 -36
- package/dist/regenerate/debugger.js +0 -133
- package/dist/regenerate/delivery.d.ts +0 -2
- package/dist/regenerate/diagnose-job.d.ts +0 -2
- package/dist/regenerate/diagnose-job.js +0 -40
- package/dist/regenerate/diagnose.d.ts +0 -46
- package/dist/regenerate/diagnose.js +0 -92
- package/dist/regenerate/diff-view.d.ts +0 -64
- package/dist/regenerate/drift.d.ts +0 -120
- package/dist/regenerate/drift.js +0 -285
- package/dist/regenerate/environment-error.d.ts +0 -167
- package/dist/regenerate/environment-error.js +0 -342
- package/dist/regenerate/failure-reports.d.ts +0 -28
- package/dist/regenerate/failure-reports.js +0 -79
- package/dist/regenerate/job-log.d.ts +0 -30
- package/dist/regenerate/job-log.js +0 -105
- package/dist/regenerate/job-panel.d.ts +0 -122
- package/dist/regenerate/job-panel.js +0 -339
- package/dist/regenerate/jobs-tree.d.ts +0 -75
- package/dist/regenerate/jobs.d.ts +0 -231
- package/dist/regenerate/jobs.js +0 -522
- package/dist/regenerate/lanes.d.ts +0 -16
- package/dist/regenerate/lanes.js +0 -32
- package/dist/regenerate/launch.d.ts +0 -256
- package/dist/regenerate/launch.js +0 -689
- package/dist/regenerate/ledger-view.d.ts +0 -87
- package/dist/regenerate/ledger-view.js +0 -325
- package/dist/regenerate/ledger.d.ts +0 -368
- package/dist/regenerate/ledger.js +0 -357
- package/dist/regenerate/lineage.d.ts +0 -105
- package/dist/regenerate/lineage.js +0 -485
- package/dist/regenerate/list-arguments.d.ts +0 -21
- package/dist/regenerate/list-arguments.js +0 -121
- package/dist/regenerate/loop.d.ts +0 -423
- package/dist/regenerate/loop.js +0 -2079
- package/dist/regenerate/masking.d.ts +0 -19
- package/dist/regenerate/masking.js +0 -95
- package/dist/regenerate/model-names.d.ts +0 -33
- package/dist/regenerate/model-names.js +0 -92
- package/dist/regenerate/notes.d.ts +0 -159
- package/dist/regenerate/notes.js +0 -446
- package/dist/regenerate/os-sandbox.d.ts +0 -93
- package/dist/regenerate/os-sandbox.js +0 -283
- package/dist/regenerate/panel-dock.d.ts +0 -23
- package/dist/regenerate/paths.d.ts +0 -110
- package/dist/regenerate/paths.js +0 -190
- package/dist/regenerate/plain-palette.d.ts +0 -34
- package/dist/regenerate/prompt.d.ts +0 -230
- package/dist/regenerate/prompt.js +0 -741
- package/dist/regenerate/pulse-files.d.ts +0 -14
- package/dist/regenerate/pulse-files.js +0 -63
- package/dist/regenerate/records.d.ts +0 -132
- package/dist/regenerate/records.js +0 -327
- package/dist/regenerate/regenerate.d.ts +0 -106
- package/dist/regenerate/regenerate.js +0 -660
- package/dist/regenerate/regression.d.ts +0 -58
- package/dist/regenerate/regression.js +0 -188
- package/dist/regenerate/renames.d.ts +0 -42
- package/dist/regenerate/renames.js +0 -185
- package/dist/regenerate/requires.d.ts +0 -117
- package/dist/regenerate/requires.js +0 -377
- package/dist/regenerate/resources.d.ts +0 -57
- package/dist/regenerate/resources.js +0 -162
- package/dist/regenerate/scripts-being-written.d.ts +0 -19
- package/dist/regenerate/scripts-being-written.js +0 -30
- package/dist/regenerate/self-check.d.ts +0 -29
- package/dist/regenerate/self-check.js +0 -119
- package/dist/regenerate/services.d.ts +0 -28
- package/dist/regenerate/services.js +0 -158
- package/dist/regenerate/shell.d.ts +0 -91
- package/dist/regenerate/shell.js +0 -320
- package/dist/regenerate/side-panel.d.ts +0 -59
- package/dist/regenerate/spec-map-view.d.ts +0 -139
- package/dist/regenerate/spec-map.d.ts +0 -160
- package/dist/regenerate/spec-map.js +0 -596
- package/dist/regenerate/spec-steps.d.ts +0 -180
- package/dist/regenerate/spec-steps.js +0 -729
- package/dist/regenerate/standing.d.ts +0 -28
- package/dist/regenerate/standing.js +0 -30
- package/dist/regenerate/state.d.ts +0 -21
- package/dist/regenerate/state.js +0 -10
- package/dist/regenerate/steering.d.ts +0 -56
- package/dist/regenerate/steering.js +0 -119
- package/dist/regenerate/stop-report.d.ts +0 -43
- package/dist/regenerate/stop-report.js +0 -160
- package/dist/regenerate/submit-work.d.ts +0 -44
- package/dist/regenerate/submit-work.js +0 -76
- package/dist/regenerate/test-kinds.d.ts +0 -85
- package/dist/regenerate/test-kinds.js +0 -171
- package/dist/regenerate/test-scripts.d.ts +0 -235
- package/dist/regenerate/test-scripts.js +0 -843
- package/dist/regenerate/testing-steps.d.ts +0 -52
- package/dist/regenerate/testing-steps.js +0 -129
- package/dist/regenerate/testing.d.ts +0 -150
- package/dist/regenerate/testing.js +0 -438
- package/dist/regenerate/transcript-view.d.ts +0 -21
- package/dist/regenerate/unit-gate.d.ts +0 -27
- package/dist/regenerate/unit-gate.js +0 -20
- package/dist/regenerate/unit-review.d.ts +0 -152
- package/dist/regenerate/unit-review.js +0 -361
- package/dist/regenerate/web.d.ts +0 -61
- package/dist/regenerate/web.js +0 -256
- package/dist/regenerate/workspace.d.ts +0 -12
- package/dist/regenerate/workspace.js +0 -99
- package/dist/regenerate-cli.d.ts +0 -1
- package/dist/resume-line.d.ts +0 -5
- package/dist/review/live.d.ts +0 -72
- package/dist/review/live.js +0 -166
- package/dist/rules.d.ts +0 -20
- package/dist/rules.js +0 -47
- package/dist/run-report.d.ts +0 -88
- package/dist/run-report.js +0 -338
- package/dist/screen-padding.d.ts +0 -28
- package/dist/self-invocation.d.ts +0 -36
- package/dist/self-invocation.js +0 -137
- package/dist/sentinel-chat.d.ts +0 -19
- package/dist/sentinel-chat.js +0 -221
- package/dist/sentinel-check.d.ts +0 -36
- package/dist/sentinel-check.js +0 -78
- package/dist/sentinel.d.ts +0 -107
- package/dist/sentinel.js +0 -599
- package/dist/settings.d.ts +0 -45
- package/dist/settings.js +0 -378
- package/dist/setup.d.ts +0 -97
- package/dist/setup.js +0 -428
- package/dist/skill-progress.d.ts +0 -46
- package/dist/skill.d.ts +0 -102
- package/dist/skill.js +0 -147
- package/dist/skills.d.ts +0 -54
- package/dist/skills.js +0 -111
- package/dist/spawn-async.d.ts +0 -18
- package/dist/spawn-async.js +0 -35
- package/dist/stack.d.ts +0 -80
- package/dist/stack.js +0 -206
- package/dist/stdlib.d.ts +0 -43
- package/dist/stdlib.js +0 -118
- package/dist/surface.d.ts +0 -5
- package/dist/surface.js +0 -18
- package/dist/terminal-images.d.ts +0 -2
- package/dist/test-plain-files.d.ts +0 -41
- package/dist/test-plain-files.js +0 -172
- package/dist/tools.d.ts +0 -101
- package/dist/tools.js +0 -242
- package/dist/turri-versions.d.ts +0 -71
- package/genome/rules/bullet-continuation.md +0 -61
- package/genome/rules/concise-specs-examples.md +0 -460
- package/genome/rules/concise-specs-integration-examples.md +0 -281
- package/genome/rules/concise-specs.md +0 -80
- package/genome/rules/definitions.md +0 -107
- package/genome/rules/examples/integration-embedded-testing/run_conformance_tests_java.sh +0 -161
- package/genome/rules/examples/integration-embedded-testing/run_unittests_java.sh +0 -50
- package/genome/rules/exported-concepts.md +0 -39
- package/genome/rules/func-specs.md +0 -164
- package/genome/rules/impl-reqs.md +0 -68
- package/genome/rules/import-modules.md +0 -49
- package/genome/rules/integration-embedded-testing.md +0 -273
- package/genome/rules/integration-embedded.md +0 -171
- package/genome/rules/integration-standalone.md +0 -135
- package/genome/rules/integrations.md +0 -136
- package/genome/rules/linked-resources.md +0 -76
- package/genome/rules/module-structure.md +0 -112
- package/genome/rules/project-model.md +0 -69
- package/genome/rules/required-concepts.md +0 -44
- package/genome/rules/requires-modules.md +0 -81
- package/genome/rules/semantic-ids.md +0 -49
- package/genome/rules/stdlib.md +0 -37
- package/genome/rules/test-plain-files.md +0 -138
- package/genome/rules/test-reqs.md +0 -57
- package/genome/rules/turri-regeneration.md +0 -66
- package/genome/skills/analyze-2-func-specs/SKILL.md +0 -116
- package/genome/skills/analyze-func-specs/SKILL.md +0 -137
- package/genome/skills/break-down-func-spec/SKILL.md +0 -229
- package/genome/skills/consolidate-concepts/SKILL.md +0 -192
- package/genome/skills/convert-old-syntax/SKILL.md +0 -68
- package/genome/skills/convert-old-syntax/references/rubric.md +0 -11
- package/genome/skills/debug-specs/SKILL.md +0 -194
- package/genome/skills/implement-conformance-testing-script/SKILL.md +0 -247
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_cypress.ps1 +0 -337
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_golang.ps1 +0 -111
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +0 -151
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.ps1 +0 -103
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +0 -146
- package/genome/skills/implement-unit-testing-script/SKILL.md +0 -171
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_flutter.ps1 +0 -87
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_golang.ps1 +0 -73
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_java.sh +0 -82
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.ps1 +0 -81
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.sh +0 -102
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_react.ps1 +0 -87
- package/genome/skills/refactor-module/SKILL.md +0 -218
- package/genome/skills/resolve-section-ownership/SKILL.md +0 -64
- package/genome/skills/resolve-spec-conflict/SKILL.md +0 -102
- package/stdlib/backend/common.plain +0 -25
- package/stdlib/backend/conformance/common.plain +0 -12
- package/stdlib/backend/conformance/go-gin.plain +0 -9
- package/stdlib/backend/conformance/go-nethttp.plain +0 -9
- package/stdlib/backend/conformance/java-springboot.plain +0 -9
- package/stdlib/backend/conformance/python-django.plain +0 -9
- package/stdlib/backend/conformance/python-fastapi.plain +0 -9
- package/stdlib/backend/conformance/python-flask.plain +0 -9
- package/stdlib/backend/conformance/rust-axum.plain +0 -9
- package/stdlib/backend/conformance/typescript-express.plain +0 -9
- package/stdlib/backend/conformance/typescript-fastify.plain +0 -9
- package/stdlib/backend/conformance/typescript-nestjs.plain +0 -9
- package/stdlib/backend/go-gin.plain +0 -18
- package/stdlib/backend/go-nethttp.plain +0 -18
- package/stdlib/backend/java-springboot.plain +0 -19
- package/stdlib/backend/python-django.plain +0 -19
- package/stdlib/backend/python-fastapi.plain +0 -23
- package/stdlib/backend/python-flask.plain +0 -23
- package/stdlib/backend/rust-axum.plain +0 -17
- package/stdlib/backend/typescript-express.plain +0 -19
- package/stdlib/backend/typescript-fastify.plain +0 -19
- package/stdlib/backend/typescript-nestjs.plain +0 -19
- package/stdlib/cli/common.plain +0 -17
- package/stdlib/cli/conformance/common.plain +0 -11
- package/stdlib/cli/conformance/go-cobra.plain +0 -9
- package/stdlib/cli/conformance/go-flag.plain +0 -9
- package/stdlib/cli/conformance/java-picocli.plain +0 -9
- package/stdlib/cli/conformance/python-argparse.plain +0 -9
- package/stdlib/cli/conformance/python-click.plain +0 -9
- package/stdlib/cli/conformance/python-typer.plain +0 -9
- package/stdlib/cli/conformance/rust-clap.plain +0 -9
- package/stdlib/cli/conformance/typescript-commander.plain +0 -9
- package/stdlib/cli/go-cobra.plain +0 -14
- package/stdlib/cli/go-flag.plain +0 -14
- package/stdlib/cli/java-picocli.plain +0 -15
- package/stdlib/cli/python-argparse.plain +0 -18
- package/stdlib/cli/python-click.plain +0 -16
- package/stdlib/cli/python-typer.plain +0 -16
- package/stdlib/cli/rust-clap.plain +0 -14
- package/stdlib/cli/typescript-commander.plain +0 -17
- package/stdlib/frontend/angular.plain +0 -17
- package/stdlib/frontend/common.plain +0 -17
- package/stdlib/frontend/conformance/angular.plain +0 -5
- package/stdlib/frontend/conformance/common.plain +0 -11
- package/stdlib/frontend/conformance/react-vite.plain +0 -5
- package/stdlib/frontend/conformance/sveltekit-spa.plain +0 -5
- package/stdlib/frontend/conformance/vue-vite.plain +0 -5
- package/stdlib/frontend/react-vite.plain +0 -16
- package/stdlib/frontend/sveltekit-spa.plain +0 -16
- package/stdlib/frontend/vue-vite.plain +0 -16
- package/stdlib/lang/go.plain +0 -13
- package/stdlib/lang/java.plain +0 -12
- package/stdlib/lang/python.plain +0 -18
- package/stdlib/lang/rust.plain +0 -12
- package/stdlib/lang/typescript.plain +0 -13
- package/stdlib/library/common.plain +0 -15
- package/stdlib/library/conformance/common.plain +0 -9
- package/stdlib/library/conformance/go.plain +0 -9
- package/stdlib/library/conformance/java-gradle.plain +0 -9
- package/stdlib/library/conformance/java-maven.plain +0 -9
- package/stdlib/library/conformance/python.plain +0 -9
- package/stdlib/library/conformance/rust.plain +0 -9
- package/stdlib/library/conformance/typescript.plain +0 -9
- package/stdlib/library/go.plain +0 -12
- package/stdlib/library/java-gradle.plain +0 -13
- package/stdlib/library/java-maven.plain +0 -13
- package/stdlib/library/python.plain +0 -13
- package/stdlib/library/rust.plain +0 -12
- package/stdlib/library/typescript.plain +0 -15
package/docs/headless.md
CHANGED
|
@@ -65,7 +65,7 @@ Useful options - `turri regenerate --help` lists all of them:
|
|
|
65
65
|
| `--from-scratch` | delete the module's code and conformance tests (its lineage keeps them) and regenerate all of it |
|
|
66
66
|
| `--from-scratch-chain` | the same for every module of its requires chain, the base's included, built again from the bottom |
|
|
67
67
|
| `turri conform --from-scratch` | take out the tests folder at the tip of the module's chain (its lineage keeps it) and write the tests again from a copy of the tests of the module the tip requires, the code untouched; `--from-scratch-chain`, from nothing |
|
|
68
|
-
| `--start-over` | start over, unasked, a codebase built without a module it now requires - without a terminal
|
|
68
|
+
| `--start-over` | start over, unasked, a codebase built without a module it now requires - without it, a terminal is asked: a no regenerates the rest of the chain, the run ending incomplete; with no terminal, the run stops there |
|
|
69
69
|
| `--build-dir <dir>` | as the run ends, export the code there - see below |
|
|
70
70
|
| `--report <file.json>` | write [the run report](#the-run-report) there |
|
|
71
71
|
|
|
@@ -181,6 +181,8 @@ A module that `requires` others is built in its own codebase on top of theirs: t
|
|
|
181
181
|
|
|
182
182
|
## If it stopped
|
|
183
183
|
|
|
184
|
+
`Ctrl-C` stops a run as it would end: its running pulses stopped and rolled back, nothing more started, the code exported to `--build-dir` and the report written - `interrupted`, exit `130`. A second `Ctrl-C` leaves at once. `SIGTERM` and `SIGHUP` leave at once too, what its agents started stopped with it.
|
|
185
|
+
|
|
184
186
|
Run the same command again. Functionalities already built from the current \*\*\*plain description are left alone, and modules that are complete are skipped, so it picks up where it stopped - after a crash, a provider outage, or a machine that went to sleep anyway. Whatever the stopped run left half-written is undone first: each step starts from the module's last commit. A functionality whose \*\*\*plain has changed since counts as not built, so editing \*\*\*plain and re-running rebuilds what changed. `--from-scratch` rebuilds the module; `--from-scratch-chain` rebuilds every module of its chain.
|
|
185
187
|
|
|
186
188
|
## Rebuilding one functionality
|
package/docs/hosting.md
CHANGED
|
@@ -1,255 +1,7 @@
|
|
|
1
1
|
# Running turri in a host
|
|
2
2
|
|
|
3
|
-
`turri` runs its chats in a terminal. A host - a desktop app, an editor -
|
|
3
|
+
`turri` runs its chats in a terminal. A host - a desktop app, an editor - runs the same session itself, its chats in its own windows, and shows what turri's terminal draws in its own way: the pulses, the questions, the \*\*\*plain.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The terminal and a host build on the same package, [`@turri-dev/core`](https://github.com/turri-oss/turri-core): each opens one session with `createTurri({ frontend })`, says in its `Frontend` what it does differently - where its chats' pi sessions are made, how it asks the person, what it shows itself, where the person watches the work - hears the session's events and asks its methods. The terminal's front end is in this repository (`src/terminal-view.ts`, `src/chat-terminal.ts`); a host writes its own. [The core's interface](https://github.com/turri-oss/turri-core/blob/main/docs/core.md) is the whole of it.
|
|
6
6
|
|
|
7
|
-
`@turri-dev/cli/host
|
|
8
|
-
|
|
9
|
-
| export | what it is |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| `createTurri(options)` | a turri session: its [chats](chats.md), each a [pi](https://pi.dev) session with every tool, slash command, rule and skill the terminal has, on one job registry and work loop. The host opens, closes and shows them, is told of their jobs and asks their questions, and asks the sentinel to check functional specs (`check`) - see [the session in a host](#the-session-in-a-host). |
|
|
12
|
-
| `SENTINEL`, `SENTINEL_START`, `Notice`, `NoticeAnswer`, `Conclusion`, `SentinelCheck`, `CheckRequest` | the [sentinel](sentinel.md)'s chat role, the answers to the question before it starts, its notices and how they are answered, its conclusions - a pulse's by `job`, a check's by `check` - and the checks a host asks of it - see [the sentinel](#the-sentinel). |
|
|
13
|
-
| `MAX_CHATS`, `ChatInfo`, `ChatStatus` | the most chats a session has open - nine - and what the host is told of each. |
|
|
14
|
-
| `pi` | [pi](https://pi.dev) itself, as turri is built against it. Make the host's own extensions and UI with this one, not another copy. |
|
|
15
|
-
| `readProjectConfig`, `projectModels`, `modelSpec`, `configForSpec`, `hasProjectConfig`, `stacksOf` | the project's settings, as [config.turri.yaml](config.md) has them. |
|
|
16
|
-
| `configSettings`, `currentValue`, `readConfigText`, `overriddenBy`, `EFFECT_TEXT` | every setting of config.turri.yaml as [/settings](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 `/settings <key> <value>` to the chat: turri checks it and writes it with the file's comments kept. A setting's values for a list are the session's `settingChoices(key, typed?)`: what /settings's completions offer after `typed`, in their order, but whole - uncapped, where the terminal shows forty - and without unset, which the host draws itself; the values alone. A model setting's are every model of every provider signed in to, from the model registry the chats use, whether or not one has run /settings - and after a colon, that model's thinking levels. An unknown key gives `[]`. |
|
|
17
|
-
| `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)). |
|
|
18
|
-
| `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). |
|
|
19
|
-
| `machineChange(command)`, `machineChangeReason(why)` | whether a command line would install something on the machine or change a setting of the machine's or the person's shell - and why - and what turri says instead: for a host's own tool that types into a shell, which turri cannot see a command in. |
|
|
20
|
-
| `installedModelRuntime(cwd?)`, `EXTENSION_PROVIDERS` | pi's model runtime with the providers the person's installed pi extensions register - for a host's sign-in sheet before a chat is open - and the providers turri knows come from an extension - see [models from a pi extension in a host](#models-from-a-pi-extension-in-a-host). |
|
|
21
|
-
| `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. |
|
|
22
|
-
| `bedrockAwsRegion`, `bedrockNeedsAwsRegion` | the AWS region turri calls a Bedrock geography's models in, and whether that geography needs a region of its own - every one but `global`, `us` and `in-region`, which [pi](https://pi.dev)'s default `us-east-1` serves. |
|
|
23
|
-
| `bedrockRegionFor(projectDir)`, `BedrockRegion`, `BedrockRegionSource` | the AWS region the project's Bedrock models are called in, read without setting anything: `{ region?, source, models, needs?, conflict? }` - `source` `set` (the person's `AWS_REGION` or `AWS_DEFAULT_REGION`, never touched), `turri` (turri sets `AWS_REGION` as the session starts, the models needing it and none set), `profile` (the `AWS_PROFILE`'s region, in the models' geography) or `default` (nothing names one: `us-east-1`); `models` the Bedrock models the config names, each stack's too; `needs` the region and geography they need, when one; `conflict`, the models needing two regions, each with its models - then no region is set, one `AWS_REGION` serving every model. `region` is undefined with no Bedrock model, or with a conflict and nothing set. Undefined on an older turri. |
|
|
24
|
-
| `checkPlainFile`, `plainFileParser`, `resolveTemplateDirs`, `iterateFunctionalSpecs`, `FUNCTIONAL_REQUIREMENTS` | \*\*\*plain checked and parsed, with its test plain files, its functional specs one by one - `{ funcId, specifications }`, the specifications with the functional spec's conformance and acceptance scenarios, each `{ id, text }` - as `turri parse` reads it. |
|
|
25
|
-
| `highlightLines`, `roleOf` | \*\*\*plain's lines coloured by turri's own [\*\*\*plain](https://plainlang.org/docs/) grammar, each piece by its `PlainRole`: `section`, `concept`, `link`, `literal`, `keyword`, `module`, `comment`, `bullet` and `id` - the `# <id>` heading of a functional spec or a scenario, and a test plain file's `func_id:` value, the functional spec it binds to. A test plain file's `module:` value is a `module`, whole - `my-app`, `billing.v2` - as a module name listed under `import:` or `requires:` is. |
|
|
26
|
-
| `plainGraph(projectDir)` | a project's \*\*\*plain as a graph to move around in: its modules with what each imports and requires and what imports and requires it, each item of their sections with its line, and the concepts - an item linked to those it names and to where each is defined - see [\*\*\*plain for a host](#plain-for-a-host). |
|
|
27
|
-
| `testDirOf(plainFile)`, `DEFAULT_TEST_DIR` | the absolute folder a module's test plain files are in - `test-dir`, its module's own file's over the project's, else `tests` (`DEFAULT_TEST_DIR`), from the project's folder - for a host that lists a project's modules by walking its .plain files and leaves the test plain files out. It is a module's, not a project's, because a module's `config.turri.<module>.yaml` may name a folder of its own. |
|
|
28
|
-
| `conceptsOf(plainFile)`, `findConcepts(text)`, `conceptBeingTyped(text)` | the concepts a module can name, with what each is and the module that defines it; the concepts written in a piece of text; the one being typed at its end. |
|
|
29
|
-
| `stdlibTemplates()`, `isStack`, `STDLIB_KINDS` | turri's standard library: every template with its kind, file, text, imports and its conformance template or the stack it tests, and the kinds in order with their titles. |
|
|
30
|
-
| `projectStanding(projectDir, { loop?, files? })`, `ModuleStanding` | how every module of a project stands, in one call - see [how a project stands](#how-a-project-stands). |
|
|
31
|
-
| `requiresOrder(projectDir, { files? })` | a project's .plain files, absolute, in the order they are built: each after every module it requires, as its requires chain (`resolveRequiresChain`) has them - the files taken in the order given, by name without `files`, each brought in after what it requires. A module whose chain does not resolve - it does not parse, a module it requires is not there, a cycle - goes after what its front matter says it requires, as far as those are found; none is left out. Only the files given are in it: `files`, absolute or from the project, else every .plain file in the project's folder. |
|
|
32
|
-
| `functionalityCompletion`, `createWorkLoop`, `createJobRegistry`, `describeModules`, `PlannedPulse` | how far each functional spec is built - each module's `specified`, `withScenarios` (those tested, which tested-of-specified counts over), `completed`, `conformanceTested`, `tested` and `incomplete` - and the work a \*\*\*plain change would plan, before it runs: the session's `turri.loop` `lookAhead(plainFile)` plans a module as regenerate would and starts nothing, and `plannedPulse(rowId)` gives a planned row's cases and - the next pulse of its codebase - its coding agent's whole prompt (`PlannedPulse`), from the plan regenerate then runs ([looking ahead](regenerating.md#a-whole-module)). |
|
|
33
|
-
| `onModelEvent`, `describeTurnIncident` | a provider failing and waited out, a turn turri ended itself. |
|
|
34
|
-
| `onLedgerEvent`, `readLedger`, `ledgerDir`, `runViews`, `pulseView`, `describePulseView`, `describeRuns`, `ledgerProjects`, `earlierPulses`, `asJob` | what turri did, as facts - the [ledger](using.md#the-ledger): each event heard as it is recorded, and every run and pulse read back, earlier sessions' too - see [the ledger in a host](#the-ledger-in-a-host). |
|
|
35
|
-
| `doctor({ dir, models, env })`, `Check`, `Level` | whether the machine - and, with `dir`, that project - is ready for turri, as `turri doctor` checks it: a list of checks to show in the host's own way - see [doctor in a host](#doctor-in-a-host). |
|
|
36
|
-
| `sweepOrphanedGroups` | stop what a turri killed outright left running, before anything starts. |
|
|
37
|
-
|
|
38
|
-
It is turri's own code, as the terminal runs it: a 0.x release may change any of it.
|
|
39
|
-
|
|
40
|
-
## A project's first config
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
import { initConfig, piModelCatalogue, bedrockMakers, bedrockModelsIn, bedrockDefaultModels } from "@turri-dev/cli/host";
|
|
44
|
-
|
|
45
|
-
const catalogue = await piModelCatalogue();
|
|
46
|
-
bedrockMakers(catalogue); // [{ maker: "xai", label: "xAI", regions: ["global", "us", "in-region"] }, ...]
|
|
47
|
-
bedrockModelsIn(catalogue, { maker: "xai", region: "global" }); // the maker's chat models there, with their prices
|
|
48
|
-
const offered = bedrockDefaultModels(catalogue, { maker: "xai", region: "global" });
|
|
49
|
-
const { written, message } = await initConfig(project, { models: { harness, coding }, catalogue });
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
`initConfig` writes config.turri.yaml as `turri init-config` does, and returns what it did - `written`, and `message`, the lines the terminal prints. It is async.
|
|
53
|
-
|
|
54
|
-
- `vendor` - `anthropic`, `openai`, `google`, `amazon-bedrock`, `claude-code` (a Claude subscription, through the [pi-claude-code](https://github.com/earendil-works/pi-claude-code) extension) or `other` - fills in that vendor's own two models (`VENDORS` has each one's label and models).
|
|
55
|
-
- `bedrock: { maker?, region }`, on Amazon Bedrock, says whose and where. turri's own pair is written where it has one - Anthropic's and OpenAI's in `BEDROCK_REGIONS` - and otherwise the pair `bedrockDefaultModels` offers from [pi](https://pi.dev)'s catalogue: any maker and geography it has.
|
|
56
|
-
- `models: { harness, coding, strong? }` writes those two instead - any pair [pi](https://pi.dev)'s catalogue has as chat models, full model ids without a thinking level (`amazon-bedrock/global.xai.grok-4.7`). They go wherever the vendor's own would: the two models with the thinking turri writes, the commented-out `judge-model` and `models:` examples, `strong` - the judging examples' model - being `harness` unless given. The vendor, the Bedrock maker and the geography are read from them, so neither `vendor` nor `bedrock` is needed. A model the catalogue does not have, or that is not a chat model, writes nothing: `written` is false and `message` says which, with the closest the catalogue has.
|
|
57
|
-
- `catalogue`, the one the host already read, saves reading it again.
|
|
58
|
-
|
|
59
|
-
The message says whose models were written - "with xAI's models on Amazon Bedrock (global)" - and how to sign in: an `AWS_PROFILE` or a Bedrock API key, never a region. For a geography that needs one, it says which turri calls it in - `turri calls eu's models in eu-central-1. AWS_REGION, set, overrides it - and so does your AWS profile's region, when it is in eu.` - `bedrockAwsRegion(geography)` being that region, and `bedrockNeedsAwsRegion(geography)` whether the geography needs one. turri sets it itself: `createTurri` - and `turri` in a terminal, and every command that calls a model - sets `AWS_REGION` for the project's Bedrock models before any is called, when they need a region and neither `AWS_REGION` nor `AWS_DEFAULT_REGION` is set, and works it out again when the config's models change through `/settings` and as each pulse takes its model. A host that shows the person where their models run reads `bedrockRegionFor(projectDir)` - "turri calls these models in eu-central-1" - rather than asking them to set anything.
|
|
60
|
-
|
|
61
|
-
## How a project stands
|
|
62
|
-
|
|
63
|
-
```js
|
|
64
|
-
import { projectStanding } from "@turri-dev/cli/host";
|
|
65
|
-
|
|
66
|
-
for (const { plainFile, module, drift, driftError, completion, completionError } of projectStanding(projectDir, { loop: turri.loop })) {
|
|
67
|
-
// drift: loop.drift(plainFile)'s reports; completion: functionalityCompletion(plainFile)'s chains.
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
`projectStanding` gives each module of the project what `drift` and `functionalityCompletion` give it asked alone - `drift`, every codebase of its requires chain with what is left to regenerate there, and `completion`, its chain's functional specs completed and conformance tested - in one call. Asked module by module, each call parses and reads the whole chain below the module again: on a project of a dozen modules in one chain, seconds. Asked of the project, each file is parsed once and each codebase's record read once, the modules below shared by every chain they are in.
|
|
72
|
-
|
|
73
|
-
- `loop` is the work loop whose `drift` is read - the session's `turri.loop`, which knows the pulses running and the codebases halted. Without one, a loop of its own, asked nothing, reads the codebases as their records have them - drift plans and starts nothing.
|
|
74
|
-
- `files` are the .plain files to look at, absolute or from the project. Without them, every .plain file in the project's folder.
|
|
75
|
-
- A module drift or completion cannot say - one that does not parse, a module it requires not there - has `driftError` or `completionError`, the message, in place of the answer; the others are answered all the same.
|
|
76
|
-
|
|
77
|
-
What it reads is kept between calls while it holds: a parse while the files it read are as they were - their text, and the files it looked for still not there - a codebase's record by the commit its history is at, a config file by its size and modification time. Asked again with nothing changed, it costs a fraction of the first call; a change is seen at the next. `plainGraph`, `checkPlainFile`, `plainFileParser`, `drift` and `functionalityCompletion` keep the same.
|
|
78
|
-
|
|
79
|
-
## Models from a pi extension in a host
|
|
80
|
-
|
|
81
|
-
A provider a [pi](https://pi.dev) extension registers - `claude-code`, a Claude subscription through Claude Code ([a Claude subscription](claude-subscription.md)), or a company's own gateway - is in a host's chats as in the terminal's: each chat's resource loader loads the person's installed pi packages, and turri's agents take the providers from the chat. Without a chat, turri loads the installed extensions itself - `piModelCatalogue`, `doctor` and `initConfig` see their providers. What a host does with pi's model runtime itself before a chat is open - its sign-in sheet listing the providers and whether each is connected, say - takes `installedModelRuntime(cwd?)`: pi's runtime with the installed extensions' providers in it, loaded once a process. A `ModelRuntime.create()` of the host's own has none of them, and `claude-code` would be missing from the list until a chat is open. `EXTENSION_PROVIDERS` names the providers turri knows come from an extension - `claude-code` - each with its label, the command that installs its extension, and how it is signed in to: `claude-code`'s sign-in is Claude Code's own, `claude auth login` in a terminal, and pi's login for it refuses, saying so. The host's process needs the person's PATH, as for doctor below, to find `claude`.
|
|
82
|
-
|
|
83
|
-
## doctor in a host
|
|
84
|
-
|
|
85
|
-
```js
|
|
86
|
-
import { doctor } from "@turri-dev/cli/host";
|
|
87
|
-
|
|
88
|
-
const checks = await doctor({ dir: project, env: engineEnv });
|
|
89
|
-
// [{ level: "ok" | "missing" | "limited" | "info", name, detail, more?, fix? }, ...]
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`doctor` runs the checks `turri doctor` prints, and returns them: Node, bash, git, which OS sandbox is up under the agents' commands, and whether any model provider has credentials. With `dir`, the project too: whether this machine has the toolchains its modules' implementation reqs name, what in its testing scripts it does not have, and - when its config names a `claude-code/...` model - the `Claude subscription` check: pi-claude-code installed, Claude Code on the PATH, signed in to a subscription, and nothing set that the extension refuses. It prints nothing and asks nothing; each check's `fix` is plain text, to show as it is. A check `missing` means turri cannot run until it is fixed, `limited` that it runs with less.
|
|
93
|
-
|
|
94
|
-
- `dir` is the project to check - not the process's working folder, which in a host is not the project. Without it, only the machine is checked.
|
|
95
|
-
- `models: true` asks each model the project's config.turri.yaml names for a word, with this machine's credentials - a request a model, which costs money. It is off by default: run it when the person asks.
|
|
96
|
-
- `env` is the environment whose PATH is looked in - for bash, git, the sandbox, the toolchains and what the testing scripts run - by default the process's own. A Mac app opened from Finder runs with `/usr/bin:/bin:/usr/sbin:/sbin`, not the person's shell's PATH: pass the environment the host's engine runs turri with, so doctor checks the PATH turri will actually have.
|
|
97
|
-
|
|
98
|
-
It never holds the host's thread up: every command it runs - bash, git, the sandbox, `java_home`, a base folder's `git ls-files` - runs without blocking, side by side, and the project's modules are parsed one at a time, the thread given back between them.
|
|
99
|
-
|
|
100
|
-
What matters only in a terminal - `turri` on the PATH, a plain `pi` an older turri made load turri - is left to `turri doctor`.
|
|
101
|
-
|
|
102
|
-
## The session in a host
|
|
103
|
-
|
|
104
|
-
```js
|
|
105
|
-
import { createTurri, pi } from "@turri-dev/cli/host";
|
|
106
|
-
|
|
107
|
-
process.chdir(project); // the session is the project's in the process's working folder
|
|
108
|
-
const turri = await createTurri({
|
|
109
|
-
onJobChange: (job) => {}, // a job started, moved on, did something, or ended - any chat's
|
|
110
|
-
onPlanChange: () => {}, // what is planned changed with no job
|
|
111
|
-
dialogs: (chat) => ({ select, input }), // a chat's questions, put in the host's own dialogs - each with a signal to close it
|
|
112
|
-
uiContext: (chat) => uiContext, // a chat's other UI calls - notices, the working line
|
|
113
|
-
surface: SURFACE, // the host's UI, in its own words, told to the model in place of the terminal's
|
|
114
|
-
systemPrompt: (prompt) => prompt, // the last word on the whole system prompt, each turn
|
|
115
|
-
extensions: [browser, terminal], // the host's own extensions, built into every chat after turri's
|
|
116
|
-
restore: true, // reopen the last session's chats here, as `turri --continue` does
|
|
117
|
-
onNotice: (notice) => {}, // the sentinel puts something to the person: draw it in notice.chat
|
|
118
|
-
onNoticeOver: (notice) => {}, // ...answered, dismissed, ignored or superseded: take its card down
|
|
119
|
-
onConcluded: (conclusion) => {}, // the sentinel is done with a pulse - or a check: holds, wrong or unchecked, told to conclusion.chat
|
|
120
|
-
pulseEndsShown: true, // the host shows each pulse that lands and each conclusion itself: the chat is told without a turn
|
|
121
|
-
onChatSession: (chat, session) => {}, // a chat's session replaced, same id: the sentinel's, fresh for each pulse - follow this one
|
|
122
|
-
sentinel: {
|
|
123
|
-
tools: [browserTool], // the sentinel's own tools, beside turri's: what it tests a launch with
|
|
124
|
-
surface: "...", // where the person watches it use them, in the host's words
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
const chat = await turri.openChat(); // { id, title, status, shown, session }: a fresh chat, shown
|
|
129
|
-
chat.session.subscribe((event) => {}); // pi's session: its events, prompt(), abort()
|
|
130
|
-
await chat.session.prompt("add a cart to the shop");
|
|
131
|
-
turri.focus(other.id); // the chat the person looks at now
|
|
132
|
-
await turri.interrupt(chat.id); // ctrl+c: "stopped" what it was doing, else "ended" the session - "ignored", "missing"
|
|
133
|
-
await turri.decline(chat.id); // ctrl+c at a question: "declined", the turn going on - "none", "missing"
|
|
134
|
-
turri.chats(); // [{ id, title, status: "idle" | "working" | "question" | "unread", shown, role? }]
|
|
135
|
-
turri.notices(); // the notices open now
|
|
136
|
-
turri.check({ module: "app", funcIds: ["add-task"] }); // the sentinel to test these in what is launched of app: { check: id } or { refused: why }
|
|
137
|
-
turri.settingChoices("harness-model"); // every value /settings offers for a setting, whole: every model signed in to
|
|
138
|
-
turri.settingChoices("harness-model", "openai/gpt-6-astra:"); // after a colon, that model's thinking levels
|
|
139
|
-
turri.turnOnConformanceTests("app.plain"); // conformance tests on: the file written - config.turri.yaml, or the stack's
|
|
140
|
-
await turri.answer(notice.id, { action: 0 }); // or { steer: "…" }, { dismiss: true }, { ignore: true }: "done", "dismissed", "ignored", "refused", "over", "missing"
|
|
141
|
-
turri.onChats((chats) => {}); // a chat opened, closed, renamed, working or done
|
|
142
|
-
await turri.closeChat(chat.id); // its turn stopped, its conversation deleted - its pulses run on
|
|
143
|
-
turri.jobs; // the session's job registry: every pulse any chat started
|
|
144
|
-
turri.loop; // its work loop, once a chat is open
|
|
145
|
-
await turri.dispose(); // every chat let go, what launches started stopped
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
- **The chats.** Up to nine, each its own history, model, thinking level and stack, all on the session's one job registry and work loop - see [chats](chats.md). `openChat({ sessionFile })` reopens a saved one. A pulse's end goes to the sentinel (below), and is shown in the chat `focus` last named - its agent told of a pulse that landed only to say so and what the sentinel is doing with it, and not told of one that went wrong. What the `surface` says to do once something is launched is then not done after a pulse: the sentinel tests what was launched. With `sentinel: false`, it is told to the chat that asked for it, its agent reacting there - to the chat `focus` last named when that one is closed. A chat is never hidden from turri's side: what the host does not show, it still runs, and its questions go to the host's dialogs at once - the host decides where they wait. `status` says a turn is running (`working`) or that it said something since it was last focused (`unread`).
|
|
149
|
-
- **Interrupting.** `interrupt(id)` is the terminal's ctrl+c for a host's key or button: it stops what that chat is doing - its turn, a skill or a tool in it, a `!` command, a compaction - and nothing in the other chats (`stopped`). A skill stopped keeps its run, to be continued. A question of the chat's open in the host's dialogs when its turn is stopped is over - declined - and its dialog's `signal` aborted, for the host to close it. A chat doing nothing ends the session, every chat with it, as `dispose` does (`ended`): turri never exits the host's process, so the host closes what showed it. An interrupt straight after one that stopped something is `ignored`, so pressing twice to be sure ends nothing. `session.abort()` is the chat's turn alone, and never ends the session.
|
|
150
|
-
- **Declining a question.** `decline(id)` is ctrl+c at a question in turri's terminal: the question the chat asks now - its ask_user, a skill's interview, a review gate's escalation, whatever goes through the host's dialogs - declined. The asker is told "The user declined to answer the question." and the turn goes on; a review gate declined stands. It declines each question it is called at, however many in a row, and never stops the turn - that is `interrupt`. `none` when the chat asks nothing now, `missing` for a chat not open. A dialog that resolves with `undefined` is something else - dismissed, and in a question of several answers "done" with the boxes ticked so far.
|
|
151
|
-
- **The record.** The chats are recorded in `.turri/chats.json` as the terminal records them, and `restore: true` reopens the last ended session's - without it, a host starts with none and deletes nothing. A chat closed is deleted; a session's chats are kept until five newer sessions have recorded theirs.
|
|
152
|
-
- **The jobs.** The host is told of each job as it changes, and has the registry and the loop themselves, so it shows the very jobs the chats run. Its buttons are best a chat's commands - `session.prompt("/regenerate app.plain")`, `session.prompt("/conform app.plain app:add-task")` - so the plan is the chats', and no model turn stands between the button and the pulse. A job's \*\*\*plain diff is `job.diff`, and `job.diffWhere` places its lines in the `.plain` files: by a line's place in the diff, its `file`, its `line` there, the `section` it is in and `written` - the line as the file has it. The diff is \*\*\*plain as read, a link `[text](path)` in it as `` `[resource]text` ``, so a host that finds the lines again in a file's text - after an edit since the pulse started - matches them by `written`, never by the diff's text. A `job.diff` in a ledger written before `written` was added has none. `job.cases` is the functional specs the pulse covers, as planned, by what it does to each - `{ add, patch, again, delete }`, each a list of `{ module, funcId }`, `module` the pulse's own or one below it: new, changed, regenerated again with its text unchanged, taken out. A host lights those specs from it, and marks a line of the diff as regenerated again from `again` - never from the diff, where such a line is unchanged. A pulse of none is mechanical - reqs, or definitions none uses; a job that is not a pulse has no `cases`. The ledger's `job.queued` carries them too. `job.building` is the one functional spec a job is on now, when it is on one: `{ spec: { module, funcId }, label, text, since }` - `spec` the functional spec as data, `label` and `text` what the terminal shows (`core:add-task, functional spec of 3`, its text with its scenarios). Only a conformance run of one named functional spec sets it; a pulse the work loop plans covers its functional specs together and leaves it unset - light those from `cases`.
|
|
153
|
-
- **The questions.** `dialogs(chat)` gives a chat's two dialogs: `select(title, options, context, at, { signal })` and `input(title, context, { signal })`, each resolving with the answer, or undefined when the person dismissed it. `signal` is aborted when the question is over without the dialog's answer - declined by `decline`, or its turn stopped (`interrupt`, `session.abort()`): the host closes the dialog it opened for it, whatever it resolves with then being ignored. A host may leave it unread. The chat's questions, a skill's interview and a review gate's escalation are put in them; without them, in the `uiContext`'s own dialogs.
|
|
154
|
-
- **The surface.** What turri tells the model of where the person watches the work is the terminal's by default: regen, the side panel on `ctrl+h`, `/pulses`. In a host none of that is there, and the model would send the person to keys and panels that do not exist. `surface` is the host's own description of its UI - the views it has in place of the terminal's, what its marks and buttons mean, where questions appear - in its own words. Given, turri leaves every terminal instruction out of what the model is told and puts the surface in turri's identity, as a `<surface>` block, where the identity speaks of regen. It reaches the side questions and the tools' own words too: a pulse not found says the `pulses` tool lists them, not `/pulses`. Text only the person sees in the terminal - the job panel, the side panel - is the terminal's and stays as it is. Without `surface`, the prompt is the terminal's, byte for byte. What the conversation is to do once something is launched belongs there too - open it in the host's preview, say what to test: it is told once each launch it asked for ends, and - with `sentinel: false` - each launch after a pulse under `launch-after-pulse`, and does then what it was told to do once something is launched. With the sentinel on, the sentinel tests what is launched after a pulse, and the conversation only says it landed. With `sentinel: false`, the chat that asked for a pulse that lands under `launch-after-pulse` is told as it lands that its commit is being launched in the background - to say so in a line and offer nothing else - and then told the launch's end. Every launch, as it is asked for, starts and ends, comes to the host as `onLaunch(launch)` - its codebase, commit, status and summary. `summary` is what the launch agent said - where it runs, or why it did not come up - and nothing of turri's: show its first line as the launch's line. What turri stopped for the launch comes apart, in `stopped`, one entry a process, as it stops them - while the launch runs too: `why` (`below` - a launch of a module below it in its chain, whose code it holds; `held` - a server of another module's launch that held what it needs, `held` saying what, "port 5173"; `left-behind` - one an earlier turri session left running), the `module` whose launch started it, that `launch` and its `commit` when known, the process's `name`, `pid` and `url`. Show it beside the launch from those fields - "stopped bestiary's launch at befa07f - upgrades holds its code" - never by reading a sentence. `launchText(launch)`, exported beside the type, is the two together as the chat and the terminal read them - turri's lines, then the summary - for a host that shows the whole at a click. One whose code runs already - the chat asking for what runs, a pulse that landed only tests - comes once, `status: "launched"` with `already: true`, its own cause and the commit it was asked for; the launch that started what runs is not told again. One that ended with a newer launch of its codebase - or of a module built on it - waiting comes with its real status and `replacedBy`, the newer one's id: that one starts at once and stops what it started, so draw it as replaced rather than as running - the chat that asked for it is told so, and hears the newer one's end instead, as for one `superseded` as it waited (`supersededBy`). A launch whose servers a newer launch stopped later - one of a module built on it, which holds its code, or one that needed a port or anything else they held - comes again too, with `replacedBy` set: nothing of it runs, and the newer launch's `stopped` says what it stopped, whose it was and why (see [across a project](launch.md#across-a-project)). The newer launch may be of another codebase: what runs of a module is its own newest launch's unless one has `replacedBy`, and then the launch that id names. What a launch started, halted on request (`/halt launched`, the `halt` tool) with nothing of it left running, comes again as `status: "stopped"`, "Stopped on request.": nothing of the codebase is launched from then on, and its next launch launches anew. A launch that said a server runs is `launched` only while one it started itself runs: something else answering at its port - another turri's server, another program - makes it `failed`, its summary saying what holds the port, whose it is and how to free it. What an earlier turri's launches left running - a host that quit without `dispose`, a turri killed outright - is stopped as the session starts and before each launch of its codebase, and the next launch's `stopped` has it, `why: "left-behind"` (see [what an earlier session left running](launch.md#what-an-earlier-session-left-running)).
|
|
155
|
-
- **The banner.** The first chat's session starts with turri's banner, an entry `customType: "turri_banner"`. Its `data.config` is what turri says of the project's config files, a line each - `{ kind, file, text }`, `text` as the terminal shows it: `renamed`, a key turri renamed in the file itself, its value kept (`release-after-pulse` to `launch-after-pulse`) - information, nothing to do; `old-beside-new`, a file that sets an old name beside its new one, the old doing nothing - take it out; `unknown`, keys turri does not read - a setting it no longer has, a misspelt one. Draw `renamed` as information, the others as warnings, by `kind`, never by the words. `ConfigLine` and `ConfigLineKind` are exported.
|
|
156
|
-
- **The system prompt.** `systemPrompt(prompt)` gets the whole system prompt for the turn - [pi](https://pi.dev)'s, turri's identity and blocks, the rules - after turri's own `before_agent_start` work, and returns what is sent. It is for what `surface` does not cover; to describe the UI, use `surface`, rather than words appended after turri's that contradict them.
|
|
157
|
-
- **The mode.** Each chat is bound in [pi](https://pi.dev)'s `tui` mode: the work runs in the background and keeps the chat free, as the terminal does. Its other UI calls - its notices, its working line, a confirm - come to `uiContext(chat)`, as [pi](https://pi.dev)'s [SDK](https://github.com/earendil-works/pi) describes it.
|
|
158
|
-
|
|
159
|
-
### Conformance tests
|
|
160
|
-
|
|
161
|
-
Conformance tests are on only with `conformance-tests: true` ([config](config.md#conformance-tests)) - off when unset: then no conformance pulse runs, and the chats' `conform` is refused - turning them on is the person's decision; `conformance-tests` is one of `configSettings()`, and `settingChoices("conformance-tests")` gives `true` and `false`. To turn them on from the host's own button, the session's `turnOnConformanceTests(plainFile?)` does what `/conform` does before it tests, with no model call: it writes `conformance-tests: true` where the module's value comes from - its own `config.turri.<module>.yaml`, or a required module's, when that sets the key, which `/settings` alone would not change, else `config.turri.yaml` - the chats' `conform` no longer refused, and returns the file it wrote, from the project. `plainFile`, absolute or from the project, picks the module; omitted, the project's. It starts no conformance pulse: the host offers that itself, with `/conform`. With them on, the chats write scenarios for a functional spec they judge needs them, as a \*\*\*plain change like any other - its test plain file, `<test-dir>/<module>/<func-id>.plain` - which the work loop then tests.
|
|
162
|
-
|
|
163
|
-
A host's chats run the [background skills](skills-and-gates.md) in the background, as the terminal's do - the two that write the testing scripts: `cultivate` returns at once, and nothing of the run shows while it runs. Its result's `details` say what it started: `{ background: true, kind?, plainFile? }` - `kind` the testing script it writes, `unit` or `conformance`, and `plainFile` the module it is for, relative to the project, each left out when there is none; `started: false` too when the skill was running already and nothing new was started - enough to show "writing the unit testing script for hello.plain, in the background" with no table of which skill writes which. Its end goes to the chat that started it, once that chat is idle: a run that did its work as an entry of its session, `turri_skill_run` (`data.text`, the line - `Unit testing script written: test_scripts/run_unittests_python.sh.`), that starts no turn; one that did not as a hidden message to its agent, `customType: "turri_skill_run"` (`details.skills`), that starts a turn in which the chat tells the person what went wrong, its `details` `{ skills, runs }` - `runs` one `{ skill, kind?, plainFile? }` for each run in it, for a turn marked "unit testing script not written · hello.plain". Meanwhile a module that lacks the script waits for it, its `why` in `mapPlan()` and `status()` `waiting for its unit testing script, which is being written` - or its conformance testing script - and starts by itself once it is written. `onPlanChange` fires as it starts waiting and as it stops - the script written, or the run ended without it - as it does whenever a module's `why` changes.
|
|
164
|
-
|
|
165
|
-
A codebase that started from a [base folder](regenerating.md#the-base-folder) says so in its module's status: `loop.status()` gives `base: { folder, files }` - the folder as `base-folder:` named it, and how many of the files that came from it the codebase has still - for "started from `brand` · 12 files" in a module's head. A module built on such a codebase has the same, carried up with the code; one that started from none, or has no code yet, has no `base`. It is read again only when a pulse lands, so a host may read it on every `onPlanChange`. The record behind it, `code/.turri-base.json`, is turri's own: a host reads `base`, never the file.
|
|
166
|
-
|
|
167
|
-
### The sentinel
|
|
168
|
-
|
|
169
|
-
The [sentinel](sentinel.md) is one of the host's chats: turri opens it with the first pulse that finishes, through the host's own `create` like any chat - `onChats` hears of it, `role: "sentinel"` - and never moves `focus` to it. It closes like any chat, and the next pulse that finishes opens it again; with it on, `openChat` opens up to eight.
|
|
170
|
-
|
|
171
|
-
- **A conversation a pulse.** The sentinel checks each pulse from scratch, in a conversation of its own - one pulse at a time, the others waiting their turn. The chat keeps its id; its session is replaced. As it starts on a pulse, the session it had is stopped and let go (`abort`, `dispose`), a new one is made in its place, and `onChatSession(chat, session)` comes with it - before the pulse is put to it - then `onChats`; `session(id)` returns the new one from then on. A host that follows the sentinel's chat subscribes to that session in place of the old - an `onChats` listener that follows only the ids it has not seen would hear nothing more of it. The first pulse goes to the session the chat was opened with: there is no `onChatSession` for it. Each conversation's first message is the hidden brief of its pulse - `customType: "turri_sentinel_pulse"`, `details.jobId` - so a host that splits the sentinel's work by pulse on it still can; the conversations before are not in the new session, and what the host showed of them is its own to keep.
|
|
172
|
-
|
|
173
|
-
- **Notices.** What it finds wrong comes as `onNotice(notice)`: `{ id, chat, severity: "error" | "warning" | "info", summary, evidence: string[], actions: [{ label, task }], module?, pulse?, job?, ignorable?, state: "open" }`. Draw it in the chat `chat` names - the one `focus` last named, or, while that is the sentinel, the chat that asked for the pulse. It is drawn there as a card in the transcript too. A host given `onNotice` answers it itself - the terminal's dialog is not opened - with `answer(id, …)`: `{ action: index | label }` starts that chat's agent on the action's task, `{ steer: text }` on the person's words, `{ dismiss: true }` on nothing, this once. A notice with `ignorable: true` - a gap in the \*\*\*plain the build settled with an assumption, which the person may leave as it is - takes `{ ignore: true }` too: offer it as its own button beside the actions. Nothing is done in the chat, the notice ends `state: "ignored"` (`"ignored"`), and turri writes it to the sentinel's guidance, so it is not raised again in this session or the next; on a notice without `ignorable`, `{ ignore: true }` is `"refused"` and the notice stays open. `onNoticeOver(notice)` comes as it is answered - and when a newer notice about its module supersedes it (`state: "superseded"`) - for the host to take the card down. `notices()` lists the open ones.
|
|
174
|
-
- **Fixes it made.** The sentinel fixes the project's testing scripts and their config itself ([what it may do](sentinel.md#what-it-may-do)), and says so as a notice with `kind: "fixed"`, `severity: "info"`, no actions, the lines before and after in `evidence`: a note, with nothing to answer. Draw it as one - its card with a way to put it away (`answer(id, { dismiss: true })`), no "say what to do instead". It never supersedes a notice about its module. The terminal draws its card and puts no dialog.
|
|
175
|
-
- **The machine is the person's.** turri installs nothing and changes no setting of the machine's or the person's shell, in any chat, the sentinel's included - and through a host's tools as through its own: a tool call whose input has a `command` string - a host's `terminal_run` - is refused when the command would (`machineChange`), with what to do instead (`machineChangeReason`), as turri's own `bash` is; and the sentinel's, also when it writes a `.plain` file, or starts or runs the code in `plain_modules` - what nobody launched: it tests what is launched. A tool that types into what already runs - a terminal's `terminal_type` at a shell prompt - is the host's to check: `machineChange(text)` says whether a line would change the machine, and why.
|
|
176
|
-
- **Starting it.** Under `sentinel: ask` - as it is unset - the person is asked before it first opens in the session: a notice with `kind: "sentinel-start"`, `severity: "info"`, in the chat `chat` names, its `summary` the question in one sentence, no `evidence`, and its actions the answers - `Start the sentinel`, `Start it, and don't ask again`, `Not this session`, `Turn it off for this project`. Draw it as a question rather than as something wrong. `answer(id, { action })` answers it, by index or label - `"done"` - and `{ dismiss: true }` is not this session; turri writes `sentinel:` itself for the two that choose for the project. Until it is answered, the pulses that finish are held: neither the sentinel nor the chat hears of them. A host that offers the setting too writes it as `/settings` does - `ask`, `true` or `false` (see `configSettings`).
|
|
177
|
-
- **Conclusions.** As the sentinel is done with each pulse - all well or not - `onConcluded({ job, verdict: "holds" | "wrong", summary, module, pulse, chat })` comes, and the chat `chat` names - the one `focus` last named, as for a notice - shows it and its agent says so in a line. A pulse turri cannot brief it on - what runs cannot hold the pulse's commit, turri's own error - ends `verdict: "unchecked"`, with an error shown in that chat as well.
|
|
178
|
-
- **A host that shows them itself.** With the sentinel on, the chat the person is in is told of each pulse that lands - to say it landed and what the sentinel does with it - and of each conclusion, each in a turn of its own: its agent says it in the conversation, as the terminal has it. A host that shows both itself - its own notifications, from `onJobChange` and `onConcluded` - passes `pulseEndsShown: true`, and the chat then says neither. Both still reach it - `customType: "turri_job_landed"` and `"turri_sentinel_concluded"`, hidden - put in its conversation in order and starting no turn: its agent has them in its next turn, and knows what landed and what the sentinel found when the person asks. Their words say what happened, and ask nothing of it. The rest is as it was: the sentinel's briefs and checks, its notices, a pulse that stopped on \*\*\*plain that contradicts itself (a notice of turri's own), `onConcluded` itself - and, with the sentinel off, the turn in the chat that asked for a pulse, which does what the project's guidance says once a pulse finishes.
|
|
179
|
-
- **Checks.** `check({ module, funcIds })` asks the sentinel to test functional specs of one module - the person picked them on a list of its built ones, say - in the background, on its own judgement, reported as a pulse is. `module` is the module whose launch is checked, by name; `funcIds` the functional specs to test, each `module:func-id` - of that module, or of any module its requires chain builds on, whose code its codebase holds: `check({ module: "predators", funcIds: ["depths:gene-fragments"] })`. A bare func-id is the module's own. The check and its brief name each as `module:func-id`. It returns `{ check: id }` at once, or `{ refused: why }`, saying which: the sentinel off (`sentinel: false`), or not started this session; a module not in the project's folder, an import module, one that does not parse; a name outside its chain - `Not in predators' codebase: arena:waves - arena is not predators or a module its requires chain builds on (depths, ocean).`; a func-id its module does not have; one not built in the module's own codebase as its \*\*\*plain has it now - with where the module's code is built on instead, when it is. What is tested is what is launched of the module - its own codebase's code, which holds the code of every module its requires chain builds on - never what a pulse is writing, and never another module's: turri does not choose one for it. Under `sentinel: ask`, a check asked before the sentinel was started puts the start question first, as a pulse does - `check` set on the notice - and waits for the answer.
|
|
180
|
-
- **Queued with the pulses.** It waits its turn behind the sentinel's work, and is taken in a conversation of its own: `onChatSession`, then the conversation's first message, the hidden brief of the check - `customType: "turri_sentinel_check"`, `details: { checkId, module, funcIds }`. A pulse of its module that lands meanwhile waits for it, rather than stopping it.
|
|
181
|
-
- **In what is launched.** The sentinel launches nothing. Once the module's launches are settled - nothing launching, nothing waiting to - it is told what runs and where, as for a pulse, and each functional spec's text and scenarios, as turri reads them, to test those and not the module's others. With nothing of the module launched - never, or halted - the check ends unchecked, its summary saying so in the person's words - `Not checked: nothing of app is launched to test it in - ask the chat to try it first, which launches it.` - and with no notice: it is an answer, not an error. When the module's last launch did not come up, the sentinel is told why, and that is its finding.
|
|
182
|
-
- **Reported as a pulse is.** Its notices come as `onNotice`, with `check` - its id - and its module. It ends with `onConcluded({ check, verdict, summary, module, chat })` - `check` in place of `job`, which it has none of. A check that never runs - nothing of the module launched, the person did not start the sentinel when asked, it could not be opened, it was closed before it got to it - ends `verdict: "unchecked"`, the summary saying why, which the sentinel itself never gives. The ledger has `sentinel.asked` as it is asked for, and `sentinel.checking` and `sentinel.concluded` with `check`.
|
|
183
|
-
- **Its model.** The `sentinel` role in `models:`, else the chat's model - `models.chat`, else `harness-model` - with its thinking, set as its chat opens: not pi's default model, which may not be one the project's provider has. What the person then picks in its chat stands. See [its model](sentinel.md#its-model).
|
|
184
|
-
- **Its tools.** `sentinel: { tools }` are [pi](https://pi.dev) tool definitions registered in the sentinel's chat alone and told to it in its prompt - the host's browser, say, for it to test what is launched with. The rest of the host's `extensions` are built into its chat too, but their tools are refused it: only its own read, and these.
|
|
185
|
-
- **Its surface.** `sentinel: { surface }` is where the person watches the sentinel use those tools, in the host's own words - the preview pane its browser and terminal show in, say. Given, the sentinel's prompt has it, as a `<surface>` block, in place of the person not watching it: it tries what is launched with the host's tools, where the person can watch, and keeps its own shell for what those 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. As for the conversation, `systemPrompt` has the last word on its prompt.
|
|
186
|
-
- **Its surface.** What it is told is its own prompt, not the conversation's: the host's `surface` is not in it; `systemPrompt` still has the last word.
|
|
187
|
-
|
|
188
|
-
A surface for a desktop app might read:
|
|
189
|
-
|
|
190
|
-
```js
|
|
191
|
-
const SURFACE = `The person uses turri's desktop app, not a terminal: there are no keys to press. Slash commands are typed in
|
|
192
|
-
the chat, and the toolbar's buttons send them too.
|
|
193
|
-
- The Specs view shows each .plain file, every functional spec marked: a green dot is built, a pulsing ring regenerating,
|
|
194
|
-
a hollow ring planned, grey waiting.
|
|
195
|
-
- The Pulses view lists every pulse - running, planned and finished. A row opens what its agents did and its log; its
|
|
196
|
-
Halt button stops it.
|
|
197
|
-
- Your questions appear as cards above the message box: the person picks an option or types an answer there.
|
|
198
|
-
- The Run button launches what is built and opens it.`;
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## \*\*\*plain for a host
|
|
202
|
-
|
|
203
|
-
```js
|
|
204
|
-
import { conceptBeingTyped, conceptsOf, findConcepts, plainGraph, stdlibTemplates, STDLIB_KINDS } from "@turri-dev/cli/host";
|
|
205
|
-
|
|
206
|
-
const { modules, items, concepts, testPlainFiles } = plainGraph(projectDir);
|
|
207
|
-
const app = modules.find((module) => module.module === "app");
|
|
208
|
-
app.requires; // [{ name: "base", file: "/…/base.plain" }] - and imports, importedBy, requiredBy, the same way
|
|
209
|
-
app.items; // ["/…/app.plain:11", "/…/app.plain:15"] - its own items, in order
|
|
210
|
-
items.find((item) => item.id === app.items[1]);
|
|
211
|
-
// { id, file, module: "app", section: "functional specs", line: 15, funcId: "fill-cart", text: ":User: can fill :Cart:.",
|
|
212
|
-
// defines: [], uses: [{ concept: ":User:", definition: "/…/base.plain:8" }, { concept: ":Cart:", definition: "/…/app.plain:11" }],
|
|
213
|
-
// resources: [{ text: "the schema", target: "schema.json", file: "/…/schema.json", line: 15 }],
|
|
214
|
-
// testPlainFile: "/…/tests/app/fill-cart.plain", scenarios: { conformance: [{ id: "adds-an-item", text: "…", line: 8 }], acceptance: [] } }
|
|
215
|
-
testPlainFiles[0];
|
|
216
|
-
// { file: "/…/tests/app/fill-cart.plain", module: "app", funcId: "fill-cart", item: "/…/app.plain:15", conformance: [...], acceptance: [...] }
|
|
217
|
-
concepts.find((concept) => concept.definition === "/…/base.plain:8");
|
|
218
|
-
// { concept: ":User:", definition: "/…/base.plain:8", module: "base", text: "is a person who signs up.", usedBy: [...] }
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
- **The graph.** `plainGraph` reads every .plain file in the project's folder and its `template/` folder, and every module they import or require, wherever the parser finds it - the standard library's templates too. A **module** is a file: its imports, resolved as the parser reads an import (a `stdlib/` module from turri's own folder), its required modules, resolved as the requires chain finds them - `file: null` when one is not found - and the reverse of both, `importedBy` and `requiredBy`, so a host goes up and down the requires chain without inverting anything. An **item** is one item of a section - a definition, an implementation req, a test req, a functional spec - with its file, the line it starts on (a functional spec's, its `# <func-id>` heading's), its text (a functional spec's, its body), a functional spec's `funcId`, its `testPlainFile` - null when it has none - and its `scenarios`, `{ conformance, acceptance }`, each `{ id, text, line }`, the concepts a definition defines, and each concept it names with the item that defines it: its own module's definitions, its imports', and those its required modules export, as the parser sees them from that module. `definition` is null for \*\*\*plain's own concepts, and for one defined nowhere the module can see. Its `resources` are the linked resources it names - `[text](target)`, as the parser reads them - each with `file`, the file regenerating reads it from (the template folders first, then the current folder), null when it is not there, and `line`, the line the link is on. `resources` is on every item, `[]` when it names none: a turri that gives no resources has no field. A **concept** is one definition of it - or \*\*\*plain's own, `definition: null` - with every item that names it there. An item's id is `<file>:<line>`: the file to open and the line to go to. A **test plain file** - each `.plain` file under the project's test folder (`test-dir`, `tests` by default) - is a node of its own: its `module` and `funcId` as its front matter binds it, `item`, the id of the functional spec it binds to, and its `conformance` and `acceptance` scenarios, each with the line its `# <scenario-id>` heading is on. One that does not parse, is outside its module's folder, or binds to no functional spec has `error`, and `item` null.
|
|
222
|
-
- **What does not parse.** Nothing throws. A file that does not parse has `error`, the parser's message; its links are what its front matter says, and its items what of its own text reads without its imports. A file whose items Liquid moves keeps the lines of its own text.
|
|
223
|
-
- **Concepts.** `conceptsOf(plainFile)` is what one module can name - `{ concept, definition, module }`, `definition` the text after its concepts, `module` null for \*\*\*plain's own - for suggestions as the person types. Inside a test plain file, call it with the module's file the test plain file binds to: its scenarios name that module's concepts. `findConcepts(text)` is every concept written in a piece of text, `{ concept, start, end }`, and `conceptBeingTyped(text)` the one at its end still open - `{ typed: ":Us", start }`, or undefined - both with the parser's own pattern.
|
|
224
|
-
- **The standard library.** `stdlibTemplates()` is every template in turri's `stdlib/`, sorted: `name` - what a module imports it as - `file`, `kind` (`backend`, `frontend`, `cli`, `library` or `lang`), `description`, `text`, `imports` as the parser reads its front matter, a stack's `conformance` template when it has one, and a conformance template's stack as `tests`. `isStack(template)` says whether it is a stack to import; `STDLIB_KINDS` is the kinds in order, each with its title.
|
|
225
|
-
|
|
226
|
-
## The ledger in a host
|
|
227
|
-
|
|
228
|
-
`createTurri` starts the ledger itself, in the process's working folder - the project's - so a host needs nothing to have one: its pulses are recorded as `host` runs, each event with the chat its work was asked for in, and the chats' `pulses` already tells the model of earlier sessions' pulses. What the host can do with it is show it.
|
|
229
|
-
|
|
230
|
-
```js
|
|
231
|
-
import { onLedgerEvent, pulseView, readLedger, runViews } from "@turri-dev/cli/host";
|
|
232
|
-
|
|
233
|
-
// Each event as it is recorded - written or not, so a project with ledger-keep: 0 is heard too.
|
|
234
|
-
const stop = onLedgerEvent((entry, project) => {
|
|
235
|
-
if (entry.kind === "healer.failed") notify(`the ${entry.healer} failed: ${entry.error}`);
|
|
236
|
-
if (entry.kind === "provider.error" && !entry.transient) notify(`the model provider: ${entry.error}`);
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
// The project's runs, the most recent first, each with its pulses, the most recent first - how each ended, how long, what it cost.
|
|
240
|
-
const runs = runViews(projectDir);
|
|
241
|
-
|
|
242
|
-
// One pulse, from this session or an earlier one: its rounds, test runs, verdicts, healers, refusals, history.
|
|
243
|
-
const view = pulseView("646d", readLedger(projectDir, { job: "646d" }));
|
|
244
|
-
|
|
245
|
-
// Earlier sessions' pulses as jobs, to list beside this session's - none this session's registry knows.
|
|
246
|
-
const { jobs, more } = earlierPulses(ledgerProjects(projectDir), new Set(turri.jobs.list().map((job) => job.id)));
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
- **Live.** `onLedgerEvent(listener)` is told every event as turri records it, with the project it is about, until what it returns is called; a listener that throws misses that event and nothing else. It is the pulse's own detail - its stages, test runs, verdicts, refusals - where `onJobChange` is the job as a whole.
|
|
250
|
-
- **Read back.** `readLedger(project, { job, run, kinds, since })` is the project's events, oldest first, the gzipped runs too; `runViews` and `pulseView` gather them into runs and pulses, and `describePulseView` and `describeRuns` say them in lines, as the chat's `pulses` tells them. `ledgerProjects(dir)` finds the ledgers of a folder and the projects under it. `earlierPulses(projects, known, runs = 3)` gives the last runs before this one as `Job`s - the shape a host already draws for this session's - each marked `earlier: { run, runMode, lines }`, `lines` what the ledger says of it, and with its `cases`, `diff` and `diffWhere` - the \*\*\*plain diff it regenerated, as last steered, and where its lines are written - as a pulse of this session has them (a pulse recorded before `job.diff` was has none); `more` is how many runs are beyond them. They are read only: never started, halted or waited for. turri's own side panel lists them so, as **earlier sessions**.
|
|
251
|
-
- **What it is for.** Looking up, never deciding: what is built and what is left come from the records and the work loop, as before. Its events and their fields are `LedgerEvent`'s - a kind is added, never changed, and every event carries `v: 1`.
|
|
252
|
-
|
|
253
|
-
## Running it
|
|
254
|
-
|
|
255
|
-
The host entry is compiled JavaScript, so any Node from 22.19 runs it - Electron's own included; nothing strips types. It finds turri's own folders - `genome/`, `stdlib/`, `.pi/` - beside `dist/` in the package, wherever npm installed it.
|
|
7
|
+
`@turri-dev/cli/host`, which carried the old desktop contract over the core's compatibility bridge, is gone: a host imports `@turri-dev/core`.
|
package/docs/installation.md
CHANGED
|
@@ -20,7 +20,7 @@ turri init-config # a config.turri.yaml with the model you talk to and the one
|
|
|
20
20
|
turri # pi, with turri's tools, skills and themes loaded
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
The package is `@turri-dev/cli` - npm keeps the name `turri` back, as too like another package's - and the command it puts on your PATH is `turri`. `npm install -g @turri-dev/cli@next` gets the latest prerelease instead, built from the last commit on `main`. Installed again - `@latest` or `@next` - it replaces the one there. `turri --version` says which turri runs, and the [pi](https://pi.dev) under it: `turri 0.
|
|
23
|
+
The package is `@turri-dev/cli` - npm keeps the name `turri` back, as too like another package's - and the command it puts on your PATH is `turri`. `npm install -g @turri-dev/cli@next` gets the latest prerelease instead, built from the last commit on `main`. Installed again - `@latest` or `@next` - it replaces the one there. `turri --version` says which turri runs, and the core and the [pi](https://pi.dev) under it: `turri 0.2.0 (core 0.2.0; pi 1.6.0)`, and from a clone the commit too.
|
|
24
24
|
|
|
25
25
|
## pi packages
|
|
26
26
|
|
|
@@ -64,13 +64,15 @@ From 0.2.1 on, turri says so itself: its banner warns, as it starts, when a newe
|
|
|
64
64
|
To work on turri itself, put the clone on your PATH instead:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
git clone git@github.com:turri-oss/turri.git && cd turri
|
|
67
|
+
git clone git@github.com:turri-oss/turri-cli.git && cd turri-cli
|
|
68
68
|
npm install
|
|
69
69
|
npm link # puts `turri` on your PATH, pointing at this clone
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
A clone runs its TypeScript sources directly - Node strips the types - so edits take effect immediately. The package on npm runs JavaScript compiled from them instead (`npm run build`, into `dist/`, run by `npm pack` and `npm publish` before they pack), as Node runs no `.ts` file inside a `node_modules`. `bin/turri.mjs` runs `src/` where there is one, and `dist/` otherwise.
|
|
73
73
|
|
|
74
|
+
To use a local `@turri-dev/core`, including before the matching core release is on npm, follow [linked development](development.md#linked-development) in place of `npm install`.
|
|
75
|
+
|
|
74
76
|
To update, `git pull` and `npm install` - the second picks up a dependency that changed, [pi](https://pi.dev)'s say. `npm link` needs running only once. A **turri** already running keeps the code it started with: start it again to run what you pulled.
|
|
75
77
|
|
|
76
78
|
## In Docker
|
|
@@ -100,7 +102,7 @@ In a project - a folder with `config.turri.yaml` (or the old `config.yaml`) or `
|
|
|
100
102
|
| the AWS region | for a project whose models are on Amazon Bedrock: the region they are called in, and where it comes from - turri's, set for the geography they need; the person's `AWS_REGION`; the profile's - and wrong when the person's is outside that geography, or the models need two regions, which one `AWS_REGION` cannot serve |
|
|
101
103
|
| the models | each model `config.turri.yaml` names - `harness-model`, `coding-model`, `judge-model`, every role under `models:` - sent one short request through [pi](https://pi.dev), with the credentials turri's agents will use, for any provider [pi](https://pi.dev) supports. One that answers is ready; for one that does not, it says what the provider said and what to do: the credentials [pi](https://pi.dev) reads for that provider (`AWS_PROFILE` and `AWS_REGION` for Amazon Bedrock, `OPENAI_API_KEY`, `/login`, ...), model access in the Bedrock console, the closest model ids [pi](https://pi.dev) knows for one it does not. `--harness-model`, `--coding-model` (`--model`) and `--judge-model` name models as the config's keys, as `turri regenerate` reads them - checked in a project or not. `--no-models` skips it |
|
|
102
104
|
|
|
103
|
-
Removing that file is the one thing `doctor` changes, and it asks first; `turri doctor --yes` says yes. Run without a terminal - piped, or in CI - it asks nothing and changes nothing. Run it again whenever something breaks; `turri doctor --no-models` leaves out the models' requests. In the chat, ask for a self check: the `doctor` tool runs the same checks, the models only when you ask. A host - a desktop app - runs the same checks through `doctor` and shows them itself (see [
|
|
105
|
+
Removing that file is the one thing `doctor` changes, and it asks first; `turri doctor --yes` says yes. Run without a terminal - piped, or in CI - it asks nothing and changes nothing. Run it again whenever something breaks; `turri doctor --no-models` leaves out the models' requests. In the chat, ask for a self check: the `doctor` tool runs the same checks, the models only when you ask. A host - a desktop app - runs the same checks through the core's `doctor` and shows them itself (see [the core's interface](https://github.com/turri-oss/turri-core/blob/main/docs/core.md)); what is the CLI's own - its version, the turris on the PATH, an older turri's file in every pi - is `turri doctor`'s alone.
|
|
104
106
|
|
|
105
107
|
The chat is told every turn which wall is up and what the project's modules need of this machine that it lacks. What they need is worked out from all the project's \*\*\*plain - seconds, on a project of long requires chains - so it is worked out when the first turn asks - not as the chat opens - and again after a turn in which \*\*\*plain changed, never while your message waits: a turn is told what was known last.
|
|
106
108
|
|
package/docs/launch.md
CHANGED
|
@@ -47,7 +47,7 @@ A project's launches are of several codebases: the modules of a `requires` chain
|
|
|
47
47
|
|
|
48
48
|
- **Up a chain, the newer module replaces the one below.** A launch stops what launches of every module below it in its `requires` chain started, as it stops what the last launch of its own codebase started: their code is in it, an older build of the same app. That is everything they started - a server on the same port, one on another, a worker - whatever it holds. What an earlier turri left running of them is stopped too. A launch of a module below it under way is waited for - it ends, and the newer one starts and stops what it started; one waiting is never launched (`superseded`). So whichever pulse lands, the newest build of the chain is what runs - and nothing older answers at its URL, even when the newer one does not come up.
|
|
49
49
|
- **Side by side, what does not get in the way runs on.** What turri's launches of any other module started - a branch beside it - is left running, unless it holds what this launch needs: then turri stops it, and this launch takes it. A port the harness sees itself, as `activate` starts the server. Anything else - a socket, a lock or pid file, a container name, a database kept open - the launch agent finds in what failed (its output, `lsof`, `ps`), and frees with `stop_launched`, naming a pid of it and what it holds. Either way turri stops only what its own records say one of its launches started.
|
|
50
|
-
- **Said, every time.** A launch whose servers were stopped this way is replaced: a host hears it again (`onLaunch`), with `replacedBy` the newer launch's id - nothing of it runs, and its codebase's code, for a module below, is what the newer launch runs. What the newer launch stopped is kept on it apart from what its agent said - `stopped`, an entry a process with why, whose launch, module, commit, pid and address, for a host to show beside it ([
|
|
50
|
+
- **Said, every time.** A launch whose servers were stopped this way is replaced: a host hears it again (`onLaunch`), with `replacedBy` the newer launch's id - nothing of it runs, and its codebase's code, for a module below, is what the newer launch runs. What the newer launch stopped is kept on it apart from what its agent said - `stopped`, an entry a process with why, whose launch, module, commit, pid and address, for a host to show beside it ([the core's interface](https://github.com/turri-oss/turri-core/blob/main/docs/core.md)) - and what the chat and the terminal are told begins with a line for each - `Stopped what bestiary's launch launch-17 at befa07f started - bestiary (pid 96379, http://localhost:5173): upgrades is built on bestiary and holds its code, so this launch takes its place.`, or `Stopped server (pid 96379, http://localhost:5173), from web's launch launch-4 at 1a2b3c4: it held port 5173, which cli needs.` - and the ledger has `launch.freed` and `launch.replaced`.
|
|
51
51
|
|
|
52
52
|
The [sentinel](sentinel.md) tests a pulse of a module below in the launch of the module built on it that replaced its own: that launch holds its commit, as the module started from that code.
|
|
53
53
|
|
|
@@ -73,8 +73,8 @@ With `launch-after-pulse: true` in `config.turri.yaml`, turri launches what each
|
|
|
73
73
|
|
|
74
74
|
The launch agent finds the guidance as for any launch: what the chat passed to `launch` earlier for the codebase, the project's AGENTS.md and its skills. The setting is the word to launch; the guidance says only how - without any, the code goes to `dist/<module>` and is started from there.
|
|
75
75
|
|
|
76
|
-
- **With the [sentinel](sentinel.md) on
|
|
77
|
-
- **With `sentinel: false`**,
|
|
76
|
+
- **With the [sentinel](sentinel.md) on**, the terminal puts the finished pulse in notifications. Once the launch holds its commit, the sentinel tests it and adds its conclusion there. A launch that did not come up is a finding like any other. A host hears every launch as it is asked for, starts and ends (`onLaunch`) - one out already once, as launched.
|
|
77
|
+
- **With `sentinel: false`**, finished pulses still appear in the terminal's notifications. The chat that asked for the pulse hears when the launch ends: where it runs, or why it did not come up - unless a newer launch replaced it, whose end is told instead. It then does what it was told to do once something is launched - a host such as a desktop app tells it, in its `surface`, to open it where the person can watch and say what to test.
|
|
78
78
|
|
|
79
79
|
Off without the key: launching after a pulse is then the chat's, when its guidance says so. `turri init-config` writes `launch-after-pulse: true`.
|
|
80
80
|
|
package/docs/regenerating.md
CHANGED
|
@@ -365,7 +365,7 @@ A conformance job is a \*\*\*plain diff's conformance run: the tests of its chan
|
|
|
365
365
|
|
|
366
366
|
A functional spec with no scenarios is not listed: `parse` shows it as "no scenarios - not tested".
|
|
367
367
|
|
|
368
|
-
While a codebase's work is being planned into jobs, with nothing running there, what is planned says so - the conformance tests being planned, or the work - rather than showing nothing until the plan is made. A module asked for - `regenerate`, from scratch, functionalities again - shows its work as being planned from that moment, before its code is deleted and what is left is worked out, not only once the planner runs: in the loop's status, which a host draws its plan from, and in the job panel - a module the loop holds nothing of yet, as when turri was just opened, too. A \*\*\*plain change is looked at quietly.
|
|
368
|
+
While a codebase's work is being planned into jobs, with nothing running there, what is planned says so - the conformance tests being planned, or the work - rather than showing nothing until the plan is made. A module asked for - `regenerate`, from scratch, functionalities again - shows its work as being planned from that moment, before its code is deleted and what is left is worked out, not only once the planner runs: in the loop's status, which a host draws its plan from, and in the job panel - a module the loop holds nothing of yet, as when turri was just opened, too. One whose chain has a module below it not built at all is shown waiting for that module instead, from the moment its codebase is tracked - `top.plain - waits for base` - never as being planned while the codebases below it are looked at first, each taking the planner's time: nothing plans it until the one below is built. A \*\*\*plain change is looked at quietly.
|
|
369
369
|
|
|
370
370
|
**What a conformance job tests is built.** As a conformance job starts, the harness reads the code record, `code/.turri.json`, and checks that it has every functional spec the job adds or changes tests for, as the job has it. One it does not have stops the job before any agent runs: its report says which are not built, the conformance tests halt, and the chat model tells the person. They are tried again once the code or \*\*\*plain changes. Code jobs and conformance jobs are planned apart, each track on its own: a job is one or the other. A module built on another starts with the tests record below it, as what it inherits: none of its own tests is written yet.
|
|
371
371
|
|
package/docs/sandbox.md
CHANGED
|
@@ -4,6 +4,8 @@ A regenerating agent is building one module. It has no business reading \*\*\*pl
|
|
|
4
4
|
|
|
5
5
|
## What an agent can reach
|
|
6
6
|
|
|
7
|
+
The agent's `PATH` omits the launching shell's Python virtual environments. A venv's `bin` (or Windows `Scripts`) alone is not a usable interpreter without its neighbouring `pyvenv.cfg` and packages. Commands use the next installed Python and can create a venv inside their own workspace. No additional host directory needs to be opened to trial a Python project.
|
|
8
|
+
|
|
7
9
|
Each agent's file tools reach its own module and only the parts its role needs:
|
|
8
10
|
|
|
9
11
|
| Role | Reads | Writes |
|
|
@@ -64,10 +66,10 @@ Before an agent's command runs, its text is checked (`src/regenerate/command-che
|
|
|
64
66
|
- names the code record, `.turri.json`;
|
|
65
67
|
- writes a credential file (`.env` and its variants; a template is fine) - by redirect, `tee`, `cp`, `mv` or an edit in place;
|
|
66
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;
|
|
67
|
-
- 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`), 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;
|
|
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;
|
|
68
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.
|
|
69
71
|
|
|
70
|
-
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 or an interpreter - and a `$(...)` in double quotes are checked as commands.
|
|
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 or an interpreter - and a `$(...)` in double quotes are checked as commands. 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.
|
|
71
73
|
|
|
72
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.
|
|
73
75
|
|