@turri-dev/core 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +43 -2
- package/dist/api/commands.d.ts +45 -0
- package/dist/api/commands.js +54 -0
- package/dist/api/config.d.ts +8 -0
- package/dist/api/config.js +8 -0
- package/dist/api/ledger.d.ts +3 -0
- package/dist/api/ledger.js +3 -0
- package/dist/api/plain.d.ts +13 -0
- package/dist/api/plain.js +16 -0
- package/dist/api/startup.d.ts +8 -0
- package/dist/api/startup.js +8 -0
- package/dist/api/terminal.d.ts +18 -0
- package/dist/api/terminal.js +16 -0
- package/dist/ask.d.ts +79 -0
- package/dist/ask.js +155 -0
- package/dist/background-skills.d.ts +61 -0
- package/dist/background-skills.js +121 -0
- package/dist/bedrock-region.d.ts +66 -0
- package/dist/bedrock-region.js +144 -0
- package/dist/btw.d.ts +69 -0
- package/dist/btw.js +174 -0
- package/dist/capture/agents.d.ts +406 -0
- package/dist/capture/agents.js +379 -0
- package/dist/capture/area.d.ts +58 -0
- package/dist/capture/area.js +197 -0
- package/dist/capture/assemble.d.ts +112 -0
- package/dist/capture/assemble.js +453 -0
- package/dist/capture/capture.d.ts +116 -0
- package/dist/capture/capture.js +1315 -0
- package/dist/capture/chat.d.ts +29 -0
- package/dist/capture/chat.js +94 -0
- package/dist/capture/checks.d.ts +142 -0
- package/dist/capture/checks.js +649 -0
- package/dist/capture/config.d.ts +13 -0
- package/dist/capture/config.js +66 -0
- package/dist/capture/interface.d.ts +71 -0
- package/dist/capture/interface.js +199 -0
- package/dist/capture/map.d.ts +56 -0
- package/dist/capture/map.js +530 -0
- package/dist/capture/models.d.ts +4 -0
- package/dist/capture/models.js +16 -0
- package/dist/capture/plan.d.ts +7 -0
- package/dist/capture/plan.js +13 -0
- package/dist/capture/progress.d.ts +103 -0
- package/dist/capture/progress.js +225 -0
- package/dist/capture/python-interface.d.ts +3 -0
- package/dist/capture/python-interface.js +17 -0
- package/dist/capture/report.d.ts +75 -0
- package/dist/capture/report.js +268 -0
- package/dist/capture/runners.d.ts +6 -0
- package/dist/capture/runners.js +59 -0
- package/dist/capture/scripts.d.ts +26 -0
- package/dist/capture/scripts.js +38 -0
- package/dist/capture/state.d.ts +310 -0
- package/dist/capture/state.js +43 -0
- package/dist/capture/trial.d.ts +34 -0
- package/dist/capture/trial.js +89 -0
- package/dist/chat-entries.d.ts +172 -0
- package/dist/chat-entries.js +47 -0
- package/dist/chat-idle.d.ts +7 -0
- package/dist/chat-idle.js +20 -0
- package/dist/chat-models.d.ts +11 -0
- package/dist/chat-models.js +11 -0
- package/dist/chat-queue.d.ts +20 -0
- package/dist/chat-queue.js +20 -0
- package/dist/chat-records.d.ts +50 -0
- package/dist/chat-records.js +107 -0
- package/dist/chat-scope.d.ts +14 -0
- package/dist/chat-scope.js +15 -0
- package/dist/chat-skills.d.ts +17 -0
- package/dist/chat-skills.js +18 -0
- package/dist/chat-ui.d.ts +33 -0
- package/dist/chat-ui.js +192 -0
- package/dist/chats.d.ts +359 -0
- package/dist/chats.js +1036 -0
- package/dist/config-edit.d.ts +83 -0
- package/dist/config-edit.js +395 -0
- package/dist/config.d.ts +430 -0
- package/dist/config.js +830 -0
- package/dist/conformance-switch.d.ts +25 -0
- package/dist/conformance-switch.js +86 -0
- package/dist/doctor-tool.d.ts +11 -0
- package/dist/doctor-tool.js +33 -0
- package/dist/environment.d.ts +42 -0
- package/dist/environment.js +125 -0
- package/dist/extension.d.ts +186 -0
- package/dist/extension.js +2710 -0
- package/dist/genome.d.ts +77 -0
- package/dist/genome.js +288 -0
- package/dist/graph.d.ts +52 -0
- package/dist/graph.js +247 -0
- package/dist/headless.d.ts +99 -0
- package/dist/headless.js +226 -0
- package/dist/host-session.d.ts +136 -0
- package/dist/host-session.js +139 -0
- package/dist/host.d.ts +8 -0
- package/dist/host.js +17 -0
- package/dist/identity.d.ts +7 -0
- package/dist/identity.js +75 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +7 -0
- package/dist/init-config.d.ts +195 -0
- package/dist/init-config.js +665 -0
- package/dist/installed-providers.d.ts +40 -0
- package/dist/installed-providers.js +98 -0
- package/dist/judge.d.ts +25 -0
- package/dist/judge.js +62 -0
- package/dist/launch-agent.d.ts +62 -0
- package/dist/launch-agent.js +339 -0
- package/dist/launch-session.d.ts +68 -0
- package/dist/launch-session.js +225 -0
- package/dist/launch-tools.d.ts +28 -0
- package/dist/launch-tools.js +72 -0
- package/dist/launch-track.d.ts +175 -0
- package/dist/launch-track.js +497 -0
- package/dist/loop-tools.d.ts +103 -0
- package/dist/loop-tools.js +361 -0
- package/dist/model-check.d.ts +72 -0
- package/dist/model-check.js +162 -0
- package/dist/new-project.d.ts +10 -0
- package/dist/new-project.js +42 -0
- package/dist/node-check.d.ts +12 -0
- package/dist/node-check.js +13 -0
- package/dist/notice.d.ts +115 -0
- package/dist/notice.js +61 -0
- package/dist/notifications.d.ts +21 -0
- package/dist/notifications.js +44 -0
- package/dist/parse-tool.d.ts +9 -0
- package/dist/parse-tool.js +33 -0
- package/dist/pi.d.ts +248 -0
- package/dist/pi.js +889 -0
- package/dist/plain/check.d.ts +63 -0
- package/dist/plain/check.js +235 -0
- package/dist/plain/concepts.d.ts +37 -0
- package/dist/plain/concepts.js +283 -0
- package/dist/plain/cycles.d.ts +21 -0
- package/dist/plain/cycles.js +190 -0
- package/dist/plain/errors.d.ts +26 -0
- package/dist/plain/errors.js +50 -0
- package/dist/plain/files.d.ts +47 -0
- package/dist/plain/files.js +161 -0
- package/dist/plain/graph.d.ts +107 -0
- package/dist/plain/graph.js +190 -0
- package/dist/plain/highlight.d.ts +43 -0
- package/dist/plain/highlight.js +196 -0
- package/dist/plain/index.d.ts +18 -0
- package/dist/plain/index.js +18 -0
- package/dist/plain/liquid.d.ts +22 -0
- package/dist/plain/liquid.js +124 -0
- package/dist/plain/markdown.d.ts +103 -0
- package/dist/plain/markdown.js +330 -0
- package/dist/plain/module-concepts.d.ts +32 -0
- package/dist/plain/module-concepts.js +80 -0
- package/dist/plain/parser.d.ts +163 -0
- package/dist/plain/parser.js +930 -0
- package/dist/plain/plain.tmLanguage.json +150 -0
- package/dist/plain/project.d.ts +48 -0
- package/dist/plain/project.js +155 -0
- package/dist/plain/spec.d.ts +152 -0
- package/dist/plain/spec.js +265 -0
- package/dist/plain/stdlib.d.ts +16 -0
- package/dist/plain/stdlib.js +48 -0
- package/dist/plain/test-plain-file.d.ts +59 -0
- package/dist/plain/test-plain-file.js +232 -0
- package/dist/plain-files.d.ts +21 -0
- package/dist/plain-files.js +156 -0
- package/dist/preview.d.ts +5 -0
- package/dist/preview.js +18 -0
- package/dist/questioning.d.ts +55 -0
- package/dist/questioning.js +109 -0
- package/dist/quiet.d.ts +34 -0
- package/dist/quiet.js +125 -0
- package/dist/regenerate/activity.d.ts +227 -0
- package/dist/regenerate/activity.js +250 -0
- package/dist/regenerate/agent-env.d.ts +51 -0
- package/dist/regenerate/agent-env.js +315 -0
- package/dist/regenerate/agent-shell.d.ts +54 -0
- package/dist/regenerate/agent-shell.js +121 -0
- package/dist/regenerate/arbiter.d.ts +68 -0
- package/dist/regenerate/arbiter.js +133 -0
- package/dist/regenerate/audit.d.ts +69 -0
- package/dist/regenerate/audit.js +212 -0
- package/dist/regenerate/base-folder.d.ts +70 -0
- package/dist/regenerate/base-folder.js +186 -0
- package/dist/regenerate/cases.d.ts +12 -0
- package/dist/regenerate/cases.js +149 -0
- package/dist/regenerate/change-view.d.ts +23 -0
- package/dist/regenerate/change-view.js +153 -0
- package/dist/regenerate/chunk-plan.d.ts +217 -0
- package/dist/regenerate/chunk-plan.js +937 -0
- package/dist/regenerate/codebase.d.ts +21 -0
- package/dist/regenerate/codebase.js +75 -0
- package/dist/regenerate/command-check.d.ts +66 -0
- package/dist/regenerate/command-check.js +577 -0
- package/dist/regenerate/compaction.d.ts +13 -0
- package/dist/regenerate/compaction.js +20 -0
- package/dist/regenerate/confine.d.ts +69 -0
- package/dist/regenerate/confine.js +311 -0
- package/dist/regenerate/conform.d.ts +66 -0
- package/dist/regenerate/conform.js +132 -0
- package/dist/regenerate/conformance-agents.d.ts +388 -0
- package/dist/regenerate/conformance-agents.js +1162 -0
- package/dist/regenerate/conformance.d.ts +191 -0
- package/dist/regenerate/conformance.js +1035 -0
- package/dist/regenerate/conversation-writes.d.ts +10 -0
- package/dist/regenerate/conversation-writes.js +100 -0
- package/dist/regenerate/credentials.d.ts +18 -0
- package/dist/regenerate/credentials.js +88 -0
- package/dist/regenerate/debug-log.d.ts +56 -0
- package/dist/regenerate/debug-log.js +236 -0
- package/dist/regenerate/debugger.d.ts +36 -0
- package/dist/regenerate/debugger.js +133 -0
- package/dist/regenerate/diagnose-job.d.ts +2 -0
- package/dist/regenerate/diagnose-job.js +40 -0
- package/dist/regenerate/diagnose.d.ts +46 -0
- package/dist/regenerate/diagnose.js +92 -0
- package/dist/regenerate/diff-where.d.ts +30 -0
- package/dist/regenerate/diff-where.js +85 -0
- package/dist/regenerate/drift.d.ts +120 -0
- package/dist/regenerate/drift.js +285 -0
- package/dist/regenerate/environment-error.d.ts +167 -0
- package/dist/regenerate/environment-error.js +342 -0
- package/dist/regenerate/failure-reports.d.ts +28 -0
- package/dist/regenerate/failure-reports.js +79 -0
- package/dist/regenerate/job-log.d.ts +30 -0
- package/dist/regenerate/job-log.js +105 -0
- package/dist/regenerate/job-panel.d.ts +20 -0
- package/dist/regenerate/job-panel.js +54 -0
- package/dist/regenerate/jobs.d.ts +231 -0
- package/dist/regenerate/jobs.js +522 -0
- package/dist/regenerate/lanes.d.ts +16 -0
- package/dist/regenerate/lanes.js +32 -0
- package/dist/regenerate/launch.d.ts +263 -0
- package/dist/regenerate/launch.js +725 -0
- package/dist/regenerate/ledger-view.d.ts +87 -0
- package/dist/regenerate/ledger-view.js +325 -0
- package/dist/regenerate/ledger.d.ts +368 -0
- package/dist/regenerate/ledger.js +358 -0
- package/dist/regenerate/lineage.d.ts +105 -0
- package/dist/regenerate/lineage.js +485 -0
- package/dist/regenerate/list-arguments.d.ts +21 -0
- package/dist/regenerate/list-arguments.js +121 -0
- package/dist/regenerate/loop.d.ts +423 -0
- package/dist/regenerate/loop.js +2087 -0
- package/dist/regenerate/masking.d.ts +19 -0
- package/dist/regenerate/masking.js +95 -0
- package/dist/regenerate/model-names.d.ts +33 -0
- package/dist/regenerate/model-names.js +92 -0
- package/dist/regenerate/notes.d.ts +159 -0
- package/dist/regenerate/notes.js +446 -0
- package/dist/regenerate/os-sandbox.d.ts +93 -0
- package/dist/regenerate/os-sandbox.js +283 -0
- package/dist/regenerate/paths.d.ts +110 -0
- package/dist/regenerate/paths.js +190 -0
- package/dist/regenerate/prompt.d.ts +230 -0
- package/dist/regenerate/prompt.js +741 -0
- package/dist/regenerate/pulse-files.d.ts +14 -0
- package/dist/regenerate/pulse-files.js +63 -0
- package/dist/regenerate/records.d.ts +132 -0
- package/dist/regenerate/records.js +327 -0
- package/dist/regenerate/regenerate.d.ts +106 -0
- package/dist/regenerate/regenerate.js +660 -0
- package/dist/regenerate/regression.d.ts +58 -0
- package/dist/regenerate/regression.js +188 -0
- package/dist/regenerate/renames.d.ts +42 -0
- package/dist/regenerate/renames.js +185 -0
- package/dist/regenerate/requires.d.ts +117 -0
- package/dist/regenerate/requires.js +377 -0
- package/dist/regenerate/resources.d.ts +57 -0
- package/dist/regenerate/resources.js +162 -0
- package/dist/regenerate/scripts-being-written.d.ts +19 -0
- package/dist/regenerate/scripts-being-written.js +30 -0
- package/dist/regenerate/self-check.d.ts +29 -0
- package/dist/regenerate/self-check.js +119 -0
- package/dist/regenerate/services.d.ts +28 -0
- package/dist/regenerate/services.js +158 -0
- package/dist/regenerate/shell.d.ts +91 -0
- package/dist/regenerate/shell.js +320 -0
- package/dist/regenerate/spec-map.d.ts +179 -0
- package/dist/regenerate/spec-map.js +660 -0
- package/dist/regenerate/spec-steps.d.ts +180 -0
- package/dist/regenerate/spec-steps.js +729 -0
- package/dist/regenerate/standing.d.ts +28 -0
- package/dist/regenerate/standing.js +30 -0
- package/dist/regenerate/state.d.ts +21 -0
- package/dist/regenerate/state.js +10 -0
- package/dist/regenerate/steering.d.ts +56 -0
- package/dist/regenerate/steering.js +119 -0
- package/dist/regenerate/stop-report.d.ts +43 -0
- package/dist/regenerate/stop-report.js +160 -0
- package/dist/regenerate/submit-work.d.ts +44 -0
- package/dist/regenerate/submit-work.js +76 -0
- package/dist/regenerate/test-kinds.d.ts +85 -0
- package/dist/regenerate/test-kinds.js +171 -0
- package/dist/regenerate/test-scripts.d.ts +240 -0
- package/dist/regenerate/test-scripts.js +847 -0
- package/dist/regenerate/testing-steps.d.ts +52 -0
- package/dist/regenerate/testing-steps.js +129 -0
- package/dist/regenerate/testing.d.ts +150 -0
- package/dist/regenerate/testing.js +438 -0
- package/dist/regenerate/unit-gate.d.ts +27 -0
- package/dist/regenerate/unit-gate.js +20 -0
- package/dist/regenerate/unit-review.d.ts +152 -0
- package/dist/regenerate/unit-review.js +361 -0
- package/dist/regenerate/web.d.ts +61 -0
- package/dist/regenerate/web.js +256 -0
- package/dist/regenerate/workspace.d.ts +12 -0
- package/dist/regenerate/workspace.js +99 -0
- package/dist/reopen.d.ts +29 -0
- package/dist/reopen.js +47 -0
- package/dist/review/live.d.ts +72 -0
- package/dist/review/live.js +166 -0
- package/dist/rules.d.ts +20 -0
- package/dist/rules.js +47 -0
- package/dist/run-report.d.ts +88 -0
- package/dist/run-report.js +338 -0
- package/dist/self-invocation.d.ts +36 -0
- package/dist/self-invocation.js +137 -0
- package/dist/sentinel-chat.d.ts +31 -0
- package/dist/sentinel-chat.js +178 -0
- package/dist/sentinel-check.d.ts +36 -0
- package/dist/sentinel-check.js +78 -0
- package/dist/sentinel.d.ts +107 -0
- package/dist/sentinel.js +601 -0
- package/dist/session-events.d.ts +54 -0
- package/dist/session-events.js +7 -0
- package/dist/session-spending.d.ts +21 -0
- package/dist/session-spending.js +35 -0
- package/dist/settings.d.ts +47 -0
- package/dist/settings.js +385 -0
- package/dist/setup.d.ts +99 -0
- package/dist/setup.js +357 -0
- package/dist/skill.d.ts +102 -0
- package/dist/skill.js +147 -0
- package/dist/skills.d.ts +54 -0
- package/dist/skills.js +111 -0
- package/dist/spawn-async.d.ts +18 -0
- package/dist/spawn-async.js +35 -0
- package/dist/stack.d.ts +80 -0
- package/dist/stack.js +206 -0
- package/dist/stdlib.d.ts +43 -0
- package/dist/stdlib.js +118 -0
- package/dist/surface.d.ts +5 -0
- package/dist/surface.js +18 -0
- package/dist/test-plain-files.d.ts +39 -0
- package/dist/test-plain-files.js +182 -0
- package/dist/tools.d.ts +101 -0
- package/dist/tools.js +242 -0
- package/dist/turri-versions.d.ts +71 -0
- package/dist/turri-versions.js +276 -0
- package/dist/view.d.ts +78 -0
- package/dist/view.js +1 -0
- package/docs/README.md +65 -0
- package/docs/authoring-plain.md +183 -0
- package/docs/capture.md +227 -0
- package/docs/chats.md +80 -0
- package/docs/claude-subscription.md +131 -0
- package/docs/config.md +305 -0
- package/docs/core.md +167 -0
- package/docs/development.md +92 -0
- package/docs/headless.md +229 -0
- package/docs/hosting.md +284 -0
- package/docs/images/how-turri-works.svg +48 -0
- package/docs/images/turri-banner.gif +0 -0
- package/docs/installation.md +138 -0
- package/docs/launch.md +89 -0
- package/docs/parser.md +144 -0
- package/docs/regenerating.md +528 -0
- package/docs/sandbox.md +124 -0
- package/docs/sentinel.md +92 -0
- package/docs/skills-and-gates.md +136 -0
- package/docs/theming.md +77 -0
- package/docs/using.md +213 -0
- package/genome/capture/capture.md +26 -0
- package/genome/capture/check-conventions.md +5 -0
- package/genome/capture/check-reference.md +12 -0
- package/genome/capture/compact.md +7 -0
- package/genome/capture/concepts.md +3 -0
- package/genome/capture/divide.md +9 -0
- package/genome/capture/feature.md +45 -0
- package/genome/capture/interface.md +9 -0
- package/genome/capture/modules.md +25 -0
- package/genome/capture/outline.md +11 -0
- package/genome/capture/python-interface.py +111 -0
- package/genome/capture/readability.md +12 -0
- package/genome/capture/reference.md +10 -0
- package/genome/capture/runners/python-requirements.sh +67 -0
- package/genome/capture/split.md +9 -0
- package/genome/capture/survey.md +39 -0
- package/genome/capture/trial.md +18 -0
- package/genome/capture/verify.md +7 -0
- package/genome/rules/bullet-continuation.md +61 -0
- package/genome/rules/concise-specs-examples.md +460 -0
- package/genome/rules/concise-specs-integration-examples.md +281 -0
- package/genome/rules/concise-specs.md +80 -0
- package/genome/rules/definitions.md +107 -0
- package/genome/rules/examples/integration-embedded-testing/run_conformance_tests_java.sh +161 -0
- package/genome/rules/examples/integration-embedded-testing/run_unittests_java.sh +50 -0
- package/genome/rules/exported-concepts.md +39 -0
- package/genome/rules/func-specs.md +164 -0
- package/genome/rules/impl-reqs.md +68 -0
- package/genome/rules/import-modules.md +49 -0
- package/genome/rules/integration-embedded-testing.md +273 -0
- package/genome/rules/integration-embedded.md +171 -0
- package/genome/rules/integration-standalone.md +135 -0
- package/genome/rules/integrations.md +136 -0
- package/genome/rules/linked-resources.md +76 -0
- package/genome/rules/module-structure.md +112 -0
- package/genome/rules/project-model.md +69 -0
- package/genome/rules/required-concepts.md +44 -0
- package/genome/rules/requires-modules.md +81 -0
- package/genome/rules/semantic-ids.md +49 -0
- package/genome/rules/stdlib.md +37 -0
- package/genome/rules/test-plain-files.md +138 -0
- package/genome/rules/test-reqs.md +57 -0
- package/genome/rules/turri-regeneration.md +66 -0
- package/genome/skills/analyze-2-func-specs/SKILL.md +116 -0
- package/genome/skills/analyze-func-specs/SKILL.md +137 -0
- package/genome/skills/break-down-func-spec/SKILL.md +229 -0
- package/genome/skills/consolidate-concepts/SKILL.md +192 -0
- package/genome/skills/convert-old-syntax/SKILL.md +68 -0
- package/genome/skills/convert-old-syntax/references/rubric.md +11 -0
- package/genome/skills/debug-specs/SKILL.md +194 -0
- package/genome/skills/implement-conformance-testing-script/SKILL.md +247 -0
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_cypress.ps1 +337 -0
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_golang.ps1 +111 -0
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_java.sh +151 -0
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.ps1 +103 -0
- package/genome/skills/implement-conformance-testing-script/assets/run_conformance_tests_python.sh +146 -0
- package/genome/skills/implement-unit-testing-script/SKILL.md +171 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_flutter.ps1 +87 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_golang.ps1 +73 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_java.sh +82 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.ps1 +81 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_python.sh +102 -0
- package/genome/skills/implement-unit-testing-script/assets/run_unittests_react.ps1 +87 -0
- package/genome/skills/refactor-module/SKILL.md +218 -0
- package/genome/skills/resolve-section-ownership/SKILL.md +64 -0
- package/genome/skills/resolve-spec-conflict/SKILL.md +102 -0
- package/package.json +105 -4
- package/stdlib/backend/common.plain +25 -0
- package/stdlib/backend/conformance/common.plain +12 -0
- package/stdlib/backend/conformance/go-gin.plain +9 -0
- package/stdlib/backend/conformance/go-nethttp.plain +9 -0
- package/stdlib/backend/conformance/java-springboot.plain +9 -0
- package/stdlib/backend/conformance/python-django.plain +9 -0
- package/stdlib/backend/conformance/python-fastapi.plain +9 -0
- package/stdlib/backend/conformance/python-flask.plain +9 -0
- package/stdlib/backend/conformance/rust-axum.plain +9 -0
- package/stdlib/backend/conformance/typescript-express.plain +9 -0
- package/stdlib/backend/conformance/typescript-fastify.plain +9 -0
- package/stdlib/backend/conformance/typescript-nestjs.plain +9 -0
- package/stdlib/backend/go-gin.plain +18 -0
- package/stdlib/backend/go-nethttp.plain +18 -0
- package/stdlib/backend/java-springboot.plain +19 -0
- package/stdlib/backend/python-django.plain +19 -0
- package/stdlib/backend/python-fastapi.plain +23 -0
- package/stdlib/backend/python-flask.plain +23 -0
- package/stdlib/backend/rust-axum.plain +17 -0
- package/stdlib/backend/typescript-express.plain +19 -0
- package/stdlib/backend/typescript-fastify.plain +19 -0
- package/stdlib/backend/typescript-nestjs.plain +19 -0
- package/stdlib/cli/common.plain +17 -0
- package/stdlib/cli/conformance/common.plain +11 -0
- package/stdlib/cli/conformance/go-cobra.plain +9 -0
- package/stdlib/cli/conformance/go-flag.plain +9 -0
- package/stdlib/cli/conformance/java-picocli.plain +9 -0
- package/stdlib/cli/conformance/python-argparse.plain +9 -0
- package/stdlib/cli/conformance/python-click.plain +9 -0
- package/stdlib/cli/conformance/python-typer.plain +9 -0
- package/stdlib/cli/conformance/rust-clap.plain +9 -0
- package/stdlib/cli/conformance/typescript-commander.plain +9 -0
- package/stdlib/cli/go-cobra.plain +14 -0
- package/stdlib/cli/go-flag.plain +14 -0
- package/stdlib/cli/java-picocli.plain +15 -0
- package/stdlib/cli/python-argparse.plain +18 -0
- package/stdlib/cli/python-click.plain +16 -0
- package/stdlib/cli/python-typer.plain +16 -0
- package/stdlib/cli/rust-clap.plain +14 -0
- package/stdlib/cli/typescript-commander.plain +17 -0
- package/stdlib/frontend/angular.plain +17 -0
- package/stdlib/frontend/common.plain +17 -0
- package/stdlib/frontend/conformance/angular.plain +5 -0
- package/stdlib/frontend/conformance/common.plain +11 -0
- package/stdlib/frontend/conformance/react-vite.plain +5 -0
- package/stdlib/frontend/conformance/sveltekit-spa.plain +5 -0
- package/stdlib/frontend/conformance/vue-vite.plain +5 -0
- package/stdlib/frontend/react-vite.plain +16 -0
- package/stdlib/frontend/sveltekit-spa.plain +16 -0
- package/stdlib/frontend/vue-vite.plain +16 -0
- package/stdlib/lang/go.plain +13 -0
- package/stdlib/lang/java.plain +12 -0
- package/stdlib/lang/python.plain +18 -0
- package/stdlib/lang/rust.plain +12 -0
- package/stdlib/lang/typescript.plain +13 -0
- package/stdlib/library/common.plain +15 -0
- package/stdlib/library/conformance/common.plain +9 -0
- package/stdlib/library/conformance/go.plain +9 -0
- package/stdlib/library/conformance/java-gradle.plain +9 -0
- package/stdlib/library/conformance/java-maven.plain +9 -0
- package/stdlib/library/conformance/python.plain +9 -0
- package/stdlib/library/conformance/rust.plain +9 -0
- package/stdlib/library/conformance/typescript.plain +9 -0
- package/stdlib/library/go.plain +12 -0
- package/stdlib/library/java-gradle.plain +13 -0
- package/stdlib/library/java-maven.plain +13 -0
- package/stdlib/library/python.plain +13 -0
- package/stdlib/library/rust.plain +12 -0
- package/stdlib/library/typescript.plain +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Codeplain Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @turri-dev/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**turri** is the first coding agent with the power of [regenerative software](https://chadfowler.com/regenerative-software/): you maintain the system's definition in [\*\*\*plain](https://plainlang.org/), and **turri** regenerates the code from it and proves the code conforms to it.
|
|
4
|
+
|
|
5
|
+
This is **turri**'s core: everything that decides and does - the session and its chats, the work loop, its pulses and their agents, the sandbox, launch, capture, the ledger, the \*\*\*plain parser, the skills and rules in `genome/` and the standard library in `stdlib/` - built into [pi](https://pi.dev) as an extension. It has no terminal UI and no command line: those are **turri**'s CLI's. The CLI and [turri desktop](https://github.com/turri-oss/turri-desktop) (through `@turri-dev/core/host`) are to build on this package; until they move to it, both import turri as `@turri-dev/cli`.
|
|
6
|
+
|
|
7
|
+
To use **turri**, install the CLI:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @turri-dev/cli
|
|
11
|
+
turri doctor
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Entries
|
|
15
|
+
|
|
16
|
+
| import | what |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `@turri-dev/core` | `createTurri`: a project's chats, live work, plan previews and typed session events |
|
|
19
|
+
| `@turri-dev/core/host` | [desktop integration](docs/hosting.md): diagnostics, sign-in and saved conversations |
|
|
20
|
+
| `@turri-dev/core/plain` | parse, check, highlight and explore a project's specs, including their standing on disk |
|
|
21
|
+
| `@turri-dev/core/config` | read settings and models, and initialise a project |
|
|
22
|
+
| `@turri-dev/core/ledger` | observe events and read runs and pulses back |
|
|
23
|
+
| `@turri-dev/core/terminal` | the pi extension, terminal driver and view hooks |
|
|
24
|
+
| `@turri-dev/core/commands` | unattended runs and the operations behind the CLI commands |
|
|
25
|
+
| `@turri-dev/core/startup` | Node checks, package identity and launch settings before loading pi |
|
|
26
|
+
|
|
27
|
+
The package is ESM only, with TypeScript declarations, for Node 22.19 or newer. The host and the core use one `@earendil-works/pi-coding-agent` peer (1.6.0). The harness uses git and bash. A 0.x release may change the API.
|
|
28
|
+
|
|
29
|
+
## Working on it
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone <this repository> && cd turri-core
|
|
33
|
+
npm install
|
|
34
|
+
npm run typecheck # src/ only, not tests/
|
|
35
|
+
npm test # the whole suite, about a minute - calls no model
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The TypeScript runs unbuilt, through Node's own type stripping. To try a change in the chat, link this clone into a clone of the CLI and start it with `NODE_OPTIONS=--conditions=turri-source`, so the core runs from `src/` - see [importing the core](docs/core.md#importing-the-core).
|
|
39
|
+
|
|
40
|
+
[The core](docs/core.md) says what is the core's and what is the CLI's, and how they meet: the boundary, the view, the entries a chat keeps and unattended runs. [Development](docs/development.md) has the tests, the source layout and publishing; the other pages in [docs/](docs/README.md) say how each part behaves. Read [regenerating](docs/regenerating.md), [the sandbox](docs/sandbox.md) and [skills and gates](docs/skills-and-gates.md) before changing the harness, and [contributing](CONTRIBUTING.md) before opening a pull request.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
turri is open source, under the [MIT licence](LICENSE).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type HeadlessOptions, type HeadlessView } from "../headless.ts";
|
|
2
|
+
export { moduleStates, type HeadlessView, type HeadlessEnd, type HeadlessResult } from "../headless.ts";
|
|
3
|
+
export { describeDrift, describeModules } from "../regenerate/loop.ts";
|
|
4
|
+
export { allChecks, asksModels, MARK, verdictOf } from "../setup.ts";
|
|
5
|
+
export { runCapture, CaptureError, DEFAULT_PARALLEL, type CaptureOptions, type CaptureResult } from "../capture/capture.ts";
|
|
6
|
+
export { runSkill, describeGates } from "../genome.ts";
|
|
7
|
+
export { discoverSkills } from "../skills.ts";
|
|
8
|
+
export { loadSkill } from "../skill.ts";
|
|
9
|
+
export { runAsk } from "../ask.ts";
|
|
10
|
+
export type { Decision, Reporter } from "../graph.ts";
|
|
11
|
+
export { skillRunDir, defaultBuildDir } from "../regenerate/paths.ts";
|
|
12
|
+
export { historyLog, historyShow } from "../regenerate/lineage.ts";
|
|
13
|
+
export { PACKAGE_ROOT, setTurriRoot, turriRoot, versionLine, themeFiles, extensionInstalledGlobally, themesInstalledGlobally } from "../environment.ts";
|
|
14
|
+
export { describeVersion } from "../turri-versions.ts";
|
|
15
|
+
export { applyBedrockRegion } from "../bedrock-region.ts";
|
|
16
|
+
export { bedrockMakerOf, bedrockRegionOf, vendorOf, priced, type Asked, type Paint } from "../init-config.ts";
|
|
17
|
+
export { globalExtensionFile } from "../environment.ts";
|
|
18
|
+
export { dropNoise } from "../quiet.ts";
|
|
19
|
+
export { followLaunchedLogs, runningLaunched, stopLaunched } from "../regenerate/launch.ts";
|
|
20
|
+
export type HeadlessRun = HeadlessOptions & ({
|
|
21
|
+
work: "preview";
|
|
22
|
+
} | {
|
|
23
|
+
work: "regenerate";
|
|
24
|
+
again?: string[];
|
|
25
|
+
} | {
|
|
26
|
+
work: "fromScratch";
|
|
27
|
+
chain?: boolean;
|
|
28
|
+
} | {
|
|
29
|
+
work: "conform";
|
|
30
|
+
funcIds?: string[];
|
|
31
|
+
separately?: boolean;
|
|
32
|
+
fromScratch?: "module" | "chain";
|
|
33
|
+
});
|
|
34
|
+
/** Give the CLI's request to the loop. A preview can never take a path that starts a pulse. */
|
|
35
|
+
export declare function runHeadless(request: HeadlessRun, view: HeadlessView): Promise<import("../headless.ts").HeadlessResult>;
|
|
36
|
+
/** `turri drift` without a session, a model or any work started. */
|
|
37
|
+
export declare function readDrift(plainFile: string, cwd?: string): import("../regenerate/loop.ts").DriftReport[];
|
|
38
|
+
/** A standalone CLI launch. Its view owns the console, signals and how long to follow the logs. */
|
|
39
|
+
export declare function launchModule(plainFile: string, options?: {
|
|
40
|
+
cwd?: string;
|
|
41
|
+
inModule?: string;
|
|
42
|
+
guidance?: string;
|
|
43
|
+
model?: string;
|
|
44
|
+
onDelta?: (delta: string) => void;
|
|
45
|
+
}): Promise<import("../launch-track.ts").Launch>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { configForSpec, modelSpec, projectModels } from "../config.js";
|
|
3
|
+
import { createLaunchTrack } from "../launch-track.js";
|
|
4
|
+
import { runLaunchAgent } from "../launch-agent.js";
|
|
5
|
+
import { createJobRegistry } from "../regenerate/jobs.js";
|
|
6
|
+
import { createWorkLoop } from "../regenerate/loop.js";
|
|
7
|
+
import { refuseTestPlainFile } from "../test-plain-files.js";
|
|
8
|
+
import { lookAhead } from "../preview.js";
|
|
9
|
+
import { runHeadless as run } from "../headless.js";
|
|
10
|
+
export { moduleStates } from "../headless.js";
|
|
11
|
+
export { describeDrift, describeModules } from "../regenerate/loop.js";
|
|
12
|
+
export { allChecks, asksModels, MARK, verdictOf } from "../setup.js";
|
|
13
|
+
export { runCapture, CaptureError, DEFAULT_PARALLEL } from "../capture/capture.js";
|
|
14
|
+
export { runSkill, describeGates } from "../genome.js";
|
|
15
|
+
export { discoverSkills } from "../skills.js";
|
|
16
|
+
export { loadSkill } from "../skill.js";
|
|
17
|
+
export { runAsk } from "../ask.js";
|
|
18
|
+
export { skillRunDir, defaultBuildDir } from "../regenerate/paths.js";
|
|
19
|
+
export { historyLog, historyShow } from "../regenerate/lineage.js";
|
|
20
|
+
export { PACKAGE_ROOT, setTurriRoot, turriRoot, versionLine, themeFiles, extensionInstalledGlobally, themesInstalledGlobally } from "../environment.js";
|
|
21
|
+
export { describeVersion } from "../turri-versions.js";
|
|
22
|
+
export { applyBedrockRegion } from "../bedrock-region.js";
|
|
23
|
+
export { bedrockMakerOf, bedrockRegionOf, vendorOf, priced } from "../init-config.js";
|
|
24
|
+
export { globalExtensionFile } from "../environment.js";
|
|
25
|
+
export { dropNoise } from "../quiet.js";
|
|
26
|
+
export { followLaunchedLogs, runningLaunched, stopLaunched } from "../regenerate/launch.js";
|
|
27
|
+
/** Give the CLI's request to the loop. A preview can never take a path that starts a pulse. */
|
|
28
|
+
export function runHeadless(request, view) {
|
|
29
|
+
const file = resolve(request.plainFile);
|
|
30
|
+
return run({ ...request, plainFile: file, dryRun: request.work === "preview", ask: (loop) => {
|
|
31
|
+
switch (request.work) {
|
|
32
|
+
case "preview": return lookAhead(loop, file);
|
|
33
|
+
case "regenerate": return request.again?.length ? loop.regenerateAgain(file, request.again) : loop.bringUp(file);
|
|
34
|
+
case "fromScratch": return loop.fromScratch(file, { chain: request.chain });
|
|
35
|
+
case "conform": return loop.conformance(file, { funcIds: request.funcIds, separately: request.separately, fromScratch: request.fromScratch });
|
|
36
|
+
}
|
|
37
|
+
} }, view);
|
|
38
|
+
}
|
|
39
|
+
/** `turri drift` without a session, a model or any work started. */
|
|
40
|
+
export function readDrift(plainFile, cwd = process.cwd()) {
|
|
41
|
+
const file = resolve(cwd, plainFile);
|
|
42
|
+
refuseTestPlainFile(file);
|
|
43
|
+
return createWorkLoop({ registry: createJobRegistry(), cwd, planner: false }).drift(file);
|
|
44
|
+
}
|
|
45
|
+
/** A standalone CLI launch. Its view owns the console, signals and how long to follow the logs. */
|
|
46
|
+
export async function launchModule(plainFile, options = {}) {
|
|
47
|
+
const cwd = options.cwd ?? process.cwd();
|
|
48
|
+
const file = resolve(cwd, plainFile);
|
|
49
|
+
refuseTestPlainFile(file);
|
|
50
|
+
const model = options.model ?? modelSpec(projectModels(configForSpec(file)).coding);
|
|
51
|
+
const track = createLaunchTrack({ cwd, run: (launch, code, signal, freed) => runLaunchAgent({ cwd, launch, code, signal, freed, model, onDelta: options.onDelta }) });
|
|
52
|
+
const { launch } = track.request({ plainFile: file, inModule: options.inModule, guidance: options.guidance, cause: {} });
|
|
53
|
+
return track.done(launch.id);
|
|
54
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CONFIG_FILE, configForSpec, configLines, configuredModel, debugMode, DEFAULT_TEST_DIR, hasProjectConfig, modelSpec, projectModels, readProjectConfig, moduleConfigsOf, testDirOf, booleanOption, overrideConfig, splitModelSpec, skillModel, type ConfigLine, type ConfigLineKind, type ModelChoice as ConfiguredModel, type ProjectConfig } from "../config.ts";
|
|
2
|
+
export { MODULES_DIR, projectDirOf } from "../regenerate/paths.ts";
|
|
3
|
+
export { defaultParallelJobs } from "../regenerate/jobs.ts";
|
|
4
|
+
export { configSettings, currentValue, EFFECT_TEXT, overriddenBy, readConfigText, type Effect, type Setting, type SettingKind } from "../config-edit.ts";
|
|
5
|
+
export { bedrockRegionFor, type BedrockRegion, type BedrockRegionSource } from "../bedrock-region.ts";
|
|
6
|
+
export { BEDROCK_DEFAULT, BEDROCK_GEOGRAPHIES, BEDROCK_IN_REGION, BEDROCK_REGIONS, bedrockAwsRegion, bedrockDefaultModels, bedrockMakers, bedrockModels, bedrockModelsIn, bedrockNeedsAwsRegion, bedrockPlaceOf, initConfig, makerLabel, VENDORS, type BedrockChoice, type BedrockMaker, type BedrockOffer, type InitConfigOptions, type ModelChoice, type ModelSet, type Vendor } from "../init-config.ts";
|
|
7
|
+
export { piModelCatalogue, type CatalogueModel, type ModelCatalogue } from "../model-check.ts";
|
|
8
|
+
export { hasPreset as hasBedrockPreset } from "../init-config.ts";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CONFIG_FILE, configForSpec, configLines, configuredModel, debugMode, DEFAULT_TEST_DIR, hasProjectConfig, modelSpec, projectModels, readProjectConfig, moduleConfigsOf, testDirOf, booleanOption, overrideConfig, splitModelSpec, skillModel } from "../config.js";
|
|
2
|
+
export { MODULES_DIR, projectDirOf } from "../regenerate/paths.js";
|
|
3
|
+
export { defaultParallelJobs } from "../regenerate/jobs.js";
|
|
4
|
+
export { configSettings, currentValue, EFFECT_TEXT, overriddenBy, readConfigText } from "../config-edit.js";
|
|
5
|
+
export { bedrockRegionFor } from "../bedrock-region.js";
|
|
6
|
+
export { BEDROCK_DEFAULT, BEDROCK_GEOGRAPHIES, BEDROCK_IN_REGION, BEDROCK_REGIONS, bedrockAwsRegion, bedrockDefaultModels, bedrockMakers, bedrockModels, bedrockModelsIn, bedrockNeedsAwsRegion, bedrockPlaceOf, initConfig, makerLabel, VENDORS } from "../init-config.js";
|
|
7
|
+
export { piModelCatalogue } from "../model-check.js";
|
|
8
|
+
export { hasPreset as hasBedrockPreset } from "../init-config.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Observe live facts and read earlier sessions. Only the harness records them. */
|
|
2
|
+
export { ledgerDir, onLedgerEvent, readLedger, type AgentRef, type LedgerEntry, type LedgerEvent, type LedgerKind, type LedgerQuery } from "../regenerate/ledger.ts";
|
|
3
|
+
export { asJob, describePulseView, describeRuns, earlierPulses, ledgerProjects, pulseView, runViews, type PulseView, type RunView } from "../regenerate/ledger-view.ts";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Observe live facts and read earlier sessions. Only the harness records them. */
|
|
2
|
+
export { ledgerDir, onLedgerEvent, readLedger } from "../regenerate/ledger.js";
|
|
3
|
+
export { asJob, describePulseView, describeRuns, earlierPulses, ledgerProjects, pulseView, runViews } from "../regenerate/ledger-view.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A worker's read-only view of the project on disk. A running session also knows its live work. */
|
|
2
|
+
export declare function projectStanding(projectDir: string, files?: string[]): import("../regenerate/standing.ts").ModuleStanding[];
|
|
3
|
+
export { requiresOrder } from "../regenerate/requires.ts";
|
|
4
|
+
export { resolveTemplateDirs } from "../regenerate/paths.ts";
|
|
5
|
+
export { checkPlainFile, checkPlainTargets, formatCheckResults, type CheckResult } from "../plain/check.ts";
|
|
6
|
+
export { plainFileParser } from "../plain/parser.ts";
|
|
7
|
+
export { ACCEPTANCE_TEST_HEADING, CONFORMANCE_TEST_HEADING, DEFINITIONS, FUNCTIONAL_REQUIREMENTS, NON_FUNCTIONAL_REQUIREMENTS, TEST_REQUIREMENTS, iterateFunctionalSpecs } from "../plain/spec.ts";
|
|
8
|
+
export { highlightLine, highlightLines, roleOf, type HighlightState, type PlainRole, type Token } from "../plain/highlight.ts";
|
|
9
|
+
export { RESOURCE_MARKER } from "../plain/markdown.ts";
|
|
10
|
+
export { conceptsOf, type ModuleConcept } from "../plain/module-concepts.ts";
|
|
11
|
+
export { conceptBeingTyped, findConcepts } from "../plain/concepts.ts";
|
|
12
|
+
export { plainGraph, type PlainConceptNode, type PlainGraph, type PlainItemNode, type PlainLink, type PlainModuleNode, type PlainScenario, type PlainSection, type PlainTestPlainFileNode } from "../plain/graph.ts";
|
|
13
|
+
export { isStack, STDLIB_KINDS, stdlibTemplates, type StdlibKind, type StdlibTemplate } from "../stdlib.ts";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { projectStanding as standing } from "../regenerate/standing.js";
|
|
2
|
+
/** A worker's read-only view of the project on disk. A running session also knows its live work. */
|
|
3
|
+
export function projectStanding(projectDir, files) {
|
|
4
|
+
return standing(projectDir, { files });
|
|
5
|
+
}
|
|
6
|
+
export { requiresOrder } from "../regenerate/requires.js";
|
|
7
|
+
export { resolveTemplateDirs } from "../regenerate/paths.js";
|
|
8
|
+
export { checkPlainFile, checkPlainTargets, formatCheckResults } from "../plain/check.js";
|
|
9
|
+
export { plainFileParser } from "../plain/parser.js";
|
|
10
|
+
export { ACCEPTANCE_TEST_HEADING, CONFORMANCE_TEST_HEADING, DEFINITIONS, FUNCTIONAL_REQUIREMENTS, NON_FUNCTIONAL_REQUIREMENTS, TEST_REQUIREMENTS, iterateFunctionalSpecs } from "../plain/spec.js";
|
|
11
|
+
export { highlightLine, highlightLines, roleOf } from "../plain/highlight.js";
|
|
12
|
+
export { RESOURCE_MARKER } from "../plain/markdown.js";
|
|
13
|
+
export { conceptsOf } from "../plain/module-concepts.js";
|
|
14
|
+
export { conceptBeingTyped, findConcepts } from "../plain/concepts.js";
|
|
15
|
+
export { plainGraph } from "../plain/graph.js";
|
|
16
|
+
export { isStack, STDLIB_KINDS, stdlibTemplates } from "../stdlib.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Before pi loads: check the runtime, identify the CLI and select the models and themes for this invocation. */
|
|
2
|
+
export { checkNode } from "../node-check.ts";
|
|
3
|
+
export { setTurriRoot, turriRoot, versionLine, themeFiles, extensionInstalledGlobally, themesInstalledGlobally, globalExtensionFile } from "../environment.ts";
|
|
4
|
+
export { describeVersion } from "../turri-versions.ts";
|
|
5
|
+
export { readProjectConfig, modelSpec, projectModels } from "../config.ts";
|
|
6
|
+
export { dropNoise } from "../quiet.ts";
|
|
7
|
+
export { CODING_MODEL_ENV } from "../chat-models.ts";
|
|
8
|
+
export { REOPEN_FILE_ENV, takeReopening } from "../reopen.ts";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Before pi loads: check the runtime, identify the CLI and select the models and themes for this invocation. */
|
|
2
|
+
export { checkNode } from "../node-check.js";
|
|
3
|
+
export { setTurriRoot, turriRoot, versionLine, themeFiles, extensionInstalledGlobally, themesInstalledGlobally, globalExtensionFile } from "../environment.js";
|
|
4
|
+
export { describeVersion } from "../turri-versions.js";
|
|
5
|
+
export { readProjectConfig, modelSpec, projectModels } from "../config.js";
|
|
6
|
+
export { dropNoise } from "../quiet.js";
|
|
7
|
+
export { CODING_MODEL_ENV } from "../chat-models.js";
|
|
8
|
+
export { REOPEN_FILE_ENV, takeReopening } from "../reopen.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The CLI's driver and view: register them against the same pi peer as the core. */
|
|
2
|
+
export { default, createTurriCore, processSession, shownJobs, plannedLoop, sessionLaunchesOf, echoCommand, shownAfterCommand } from "../extension.ts";
|
|
3
|
+
export type { TurriView, ViewChat, QuestionView, Declining, SidePanelView, PanelPage, CaptureProgressView } from "../view.ts";
|
|
4
|
+
export { interruptChat, terminalUi, type ChatDriver, type ChatLink, type ChatState, type Stoppable, type TurriCore } from "../chats.ts";
|
|
5
|
+
export { createChatUi, type ChatUi } from "../chat-ui.ts";
|
|
6
|
+
export { unqueue, type QueueOf } from "../chat-queue.ts";
|
|
7
|
+
export { lastRun, type RunRecord } from "../chat-records.ts";
|
|
8
|
+
export { CODING_MODEL_ENV } from "../chat-models.ts";
|
|
9
|
+
export { TerminalNotifications, type TerminalNotification } from "../notifications.ts";
|
|
10
|
+
export { BANNER_ENTRY, VERSION_ENTRY, COMMAND_OUTCOME, SIDE_ENTRY, SKILL_MESSAGE_ENTRY, INTERVIEW_ENTRY, JOB_ENTRY, HISTORY_ENTRY, MILESTONE_ENTRY, JOBS_LIST_ENTRY, NOTICE_ENTRY, NOTICE_OVER_ENTRY, CONCLUDED_ENTRY, SKILL_RUN_ENTRY, SKILL_REPORT_ENTRY, type BannerData, type CommandOutcome, type Exchange, type JobAnnouncement } from "../chat-entries.ts";
|
|
11
|
+
export { CAPTURE_PHASES, COMPACT_PHASES, capturePhases, captureStageText, duration, workOf, type CaptureStatus } from "../capture/progress.ts";
|
|
12
|
+
export { PANEL_KEY, spinner, didNotPass, finishedMark, pulseCost, summarizeDiff, type DiffStyle } from "../regenerate/job-panel.ts";
|
|
13
|
+
export { countOf, createSpecMapSource, defaultMapFiles, focusOf, hasScenarioViews, lineDiff, rungOf, type Rung, type Mark, type MarkedPage, type MarkedItem } from "../regenerate/spec-map.ts";
|
|
14
|
+
export { DIFF_HEADER, locateDiffLines, type DiffWhere } from "../regenerate/diff-where.ts";
|
|
15
|
+
export { describeAgents } from "../regenerate/activity.ts";
|
|
16
|
+
export { formatDuration, pulseName } from "../regenerate/jobs.ts";
|
|
17
|
+
export type { SpecGap } from "../regenerate/notes.ts";
|
|
18
|
+
export { REOPEN_FILE_ENV, takeReopening } from "../reopen.ts";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The CLI's driver and view: register them against the same pi peer as the core. */
|
|
2
|
+
export { default, createTurriCore, processSession, shownJobs, plannedLoop, sessionLaunchesOf, echoCommand, shownAfterCommand } from "../extension.js";
|
|
3
|
+
export { interruptChat, terminalUi } from "../chats.js";
|
|
4
|
+
export { createChatUi } from "../chat-ui.js";
|
|
5
|
+
export { unqueue } from "../chat-queue.js";
|
|
6
|
+
export { lastRun } from "../chat-records.js";
|
|
7
|
+
export { CODING_MODEL_ENV } from "../chat-models.js";
|
|
8
|
+
export { TerminalNotifications } from "../notifications.js";
|
|
9
|
+
export { BANNER_ENTRY, VERSION_ENTRY, COMMAND_OUTCOME, SIDE_ENTRY, SKILL_MESSAGE_ENTRY, INTERVIEW_ENTRY, JOB_ENTRY, HISTORY_ENTRY, MILESTONE_ENTRY, JOBS_LIST_ENTRY, NOTICE_ENTRY, NOTICE_OVER_ENTRY, CONCLUDED_ENTRY, SKILL_RUN_ENTRY, SKILL_REPORT_ENTRY } from "../chat-entries.js";
|
|
10
|
+
export { CAPTURE_PHASES, COMPACT_PHASES, capturePhases, captureStageText, duration, workOf } from "../capture/progress.js";
|
|
11
|
+
export { PANEL_KEY, spinner, didNotPass, finishedMark, pulseCost, summarizeDiff } from "../regenerate/job-panel.js";
|
|
12
|
+
export { countOf, createSpecMapSource, defaultMapFiles, focusOf, hasScenarioViews, lineDiff, rungOf } from "../regenerate/spec-map.js";
|
|
13
|
+
export { DIFF_HEADER, locateDiffLines } from "../regenerate/diff-where.js";
|
|
14
|
+
export { describeAgents } from "../regenerate/activity.js";
|
|
15
|
+
export { formatDuration, pulseName } from "../regenerate/jobs.js";
|
|
16
|
+
export { REOPEN_FILE_ENV, takeReopening } from "../reopen.js";
|
package/dist/ask.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a skill step puts a question to the person running it.
|
|
3
|
+
*
|
|
4
|
+
* The interaction policy lives here rather than in the extension so it is the same from
|
|
5
|
+
* the TUI and the CLI, and so it can be tested without a terminal.
|
|
6
|
+
*/
|
|
7
|
+
export interface AskUserRequest {
|
|
8
|
+
question: string;
|
|
9
|
+
/** Concrete choices. Selecting beats typing whenever the answer space is known. */
|
|
10
|
+
options?: string[];
|
|
11
|
+
/** Let the user pick several: each option a box to tick and untick. Their picks come back comma-separated. */
|
|
12
|
+
multiSelect?: boolean;
|
|
13
|
+
/** Deliberately asking without options, for a genuinely open question. */
|
|
14
|
+
freeForm?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* What the person must read to answer - the brief to confirm, the plan to approve - shown above the question, as the
|
|
17
|
+
* asker gives it. A skill's agent talks in a session of its own that nobody sees, so without it "Is this the right
|
|
18
|
+
* brief?" arrives with no brief.
|
|
19
|
+
*/
|
|
20
|
+
context?: string;
|
|
21
|
+
/**
|
|
22
|
+
* What the asker said last before asking - its account of the work, a probe, a regeneration - kept with the answer in the
|
|
23
|
+
* run's record and the transcript, never shown in the dialog.
|
|
24
|
+
*/
|
|
25
|
+
said?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Offer "Chat about this": an agent asked, and can answer what the person says about the question before they answer
|
|
28
|
+
* it. Not for a question the harness asks itself - nobody would answer.
|
|
29
|
+
*/
|
|
30
|
+
chattable?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type AskUser = (request: AskUserRequest) => Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* The two dialogs an implementation has to provide. `context` is what to read to answer, given apart from the question so
|
|
35
|
+
* a dialog can show a long one without losing the question and its options under it - the TUI's scrolls it.
|
|
36
|
+
*/
|
|
37
|
+
export interface AskUserIO {
|
|
38
|
+
/** `at`: the option the cursor starts on - the one just ticked, in a question of several. */
|
|
39
|
+
select(title: string, options: string[], context?: string, at?: number, asked?: DialogAsked): Promise<string | undefined>;
|
|
40
|
+
input(title: string, context?: string, asked?: DialogAsked): Promise<string | undefined>;
|
|
41
|
+
}
|
|
42
|
+
/** What a host's dialog is told beside its question. */
|
|
43
|
+
export interface DialogAsked {
|
|
44
|
+
/** Aborted when the question is over without the dialog's answer - declined, or its turn stopped: the dialog is closed. */
|
|
45
|
+
signal: AbortSignal;
|
|
46
|
+
}
|
|
47
|
+
export declare const OTHER_OPTION = "Something else\u2026";
|
|
48
|
+
export declare const CHAT_OPTION = "Chat about this";
|
|
49
|
+
export declare const DONE_OPTION = "Done \u2014 that's all of them";
|
|
50
|
+
/** An option's box in a question of several, ticked and not. */
|
|
51
|
+
export declare const TICKED = "\u2611";
|
|
52
|
+
export declare const UNTICKED = "\u2610";
|
|
53
|
+
export declare const DISMISSED = "The user dismissed the question without answering.";
|
|
54
|
+
/** ctrl+c at a question: the person would not answer it - or stopped the turn that asked it. */
|
|
55
|
+
export declare const DECLINED = "The user declined to answer the question.";
|
|
56
|
+
/** How an answer that is no answer starts: the person chose to talk about the question first. */
|
|
57
|
+
export declare const CHAT_PREFIX = "The user has not answered this question yet: they chose to talk about it first.";
|
|
58
|
+
/** What comes back when the person chose "Chat about this": what they said, and what they had picked so far. */
|
|
59
|
+
export declare function chatAnswer(said: string, picked?: string[]): string;
|
|
60
|
+
/** Whether an answer is the person choosing to talk about the question, rather than answering it. */
|
|
61
|
+
export declare function isChat(answer: string): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* A question with no options and no `free_form` is refused rather than asked.
|
|
64
|
+
*
|
|
65
|
+
* Offering choices is the thing that makes an interview quick to answer, and an optional
|
|
66
|
+
* field is one a model quietly skips. Making the free-form case explicit means asking
|
|
67
|
+
* without options is a decision rather than an omission.
|
|
68
|
+
*/
|
|
69
|
+
export declare function missingOptions(request: AskUserRequest): string | null;
|
|
70
|
+
/**
|
|
71
|
+
* The request as the person should see it: tool-call markup cut out of the question and the
|
|
72
|
+
* options - an option that was nothing but markup dropped - and a `multi_select` that leaked into
|
|
73
|
+
* the text taken as the argument it was meant to be. `leaked` when there was any.
|
|
74
|
+
*/
|
|
75
|
+
export declare function cleanRequest(request: AskUserRequest): {
|
|
76
|
+
request: AskUserRequest;
|
|
77
|
+
leaked: boolean;
|
|
78
|
+
};
|
|
79
|
+
export declare function runAsk(asked: AskUserRequest, io: AskUserIO): Promise<string>;
|
package/dist/ask.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a skill step puts a question to the person running it.
|
|
3
|
+
*
|
|
4
|
+
* The interaction policy lives here rather than in the extension so it is the same from
|
|
5
|
+
* the TUI and the CLI, and so it can be tested without a terminal.
|
|
6
|
+
*/
|
|
7
|
+
export const OTHER_OPTION = "Something else…";
|
|
8
|
+
export const CHAT_OPTION = "Chat about this";
|
|
9
|
+
export const DONE_OPTION = "Done — that's all of them";
|
|
10
|
+
/** An option's box in a question of several, ticked and not. */
|
|
11
|
+
export const TICKED = "☑";
|
|
12
|
+
export const UNTICKED = "☐";
|
|
13
|
+
export const DISMISSED = "The user dismissed the question without answering.";
|
|
14
|
+
/** ctrl+c at a question: the person would not answer it - or stopped the turn that asked it. */
|
|
15
|
+
export const DECLINED = "The user declined to answer the question.";
|
|
16
|
+
/** How an answer that is no answer starts: the person chose to talk about the question first. */
|
|
17
|
+
export const CHAT_PREFIX = "The user has not answered this question yet: they chose to talk about it first.";
|
|
18
|
+
/** What comes back when the person chose "Chat about this": what they said, and what they had picked so far. */
|
|
19
|
+
export function chatAnswer(said, picked = []) {
|
|
20
|
+
return [CHAT_PREFIX, `They said: ${said.trim()}`, ...(picked.length > 0 ? [`They had picked so far: ${picked.join(", ")}.`] : [])].join("\n");
|
|
21
|
+
}
|
|
22
|
+
/** Whether an answer is the person choosing to talk about the question, rather than answering it. */
|
|
23
|
+
export function isChat(answer) {
|
|
24
|
+
return answer.startsWith(CHAT_PREFIX);
|
|
25
|
+
}
|
|
26
|
+
/** The input after "Something else…" or "Chat about this": with nothing typed, or Esc, the options again. */
|
|
27
|
+
const BACK = "(Esc, or nothing typed: back to the options)";
|
|
28
|
+
const typedNothing = (typed) => typed === undefined || typed.trim() === "";
|
|
29
|
+
/**
|
|
30
|
+
* A question with no options and no `free_form` is refused rather than asked.
|
|
31
|
+
*
|
|
32
|
+
* Offering choices is the thing that makes an interview quick to answer, and an optional
|
|
33
|
+
* field is one a model quietly skips. Making the free-form case explicit means asking
|
|
34
|
+
* without options is a decision rather than an omission.
|
|
35
|
+
*/
|
|
36
|
+
export function missingOptions(request) {
|
|
37
|
+
const hasOptions = request.options !== undefined && request.options.length > 0;
|
|
38
|
+
if (hasOptions || request.freeForm === true)
|
|
39
|
+
return null;
|
|
40
|
+
return ("This question was not asked. Offer concrete options so the user can pick one, or set " +
|
|
41
|
+
"free_form to true if the answer genuinely cannot be anticipated (\"What is the app?\"). " +
|
|
42
|
+
"Call ask_user again.");
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A model's own tool-call syntax, leaked into an argument: `<parameter name="multi_select">false`
|
|
46
|
+
* written inside an option instead of as the argument it is. Never shown to the person.
|
|
47
|
+
*/
|
|
48
|
+
const TOOL_MARKUP = /<\/?(?:antml:)?(?:parameter|invoke|function_calls|function|tool_call|arg_key|arg_value)\b[^>]*>/i;
|
|
49
|
+
/**
|
|
50
|
+
* The request as the person should see it: tool-call markup cut out of the question and the
|
|
51
|
+
* options - an option that was nothing but markup dropped - and a `multi_select` that leaked into
|
|
52
|
+
* the text taken as the argument it was meant to be. `leaked` when there was any.
|
|
53
|
+
*/
|
|
54
|
+
export function cleanRequest(request) {
|
|
55
|
+
let leaked = false;
|
|
56
|
+
let multiSelect = request.multiSelect;
|
|
57
|
+
const clean = (text) => {
|
|
58
|
+
const flag = /<(?:antml:)?parameter\s+name="multi_select"\s*>\s*(true|false)/i.exec(text);
|
|
59
|
+
if (flag && multiSelect === undefined)
|
|
60
|
+
multiSelect = flag[1].toLowerCase() === "true";
|
|
61
|
+
const at = text.search(TOOL_MARKUP);
|
|
62
|
+
if (at === -1)
|
|
63
|
+
return text.trim();
|
|
64
|
+
leaked = true;
|
|
65
|
+
return text.slice(0, at).trim();
|
|
66
|
+
};
|
|
67
|
+
const question = clean(request.question);
|
|
68
|
+
const options = request.options === undefined ? undefined : [...new Set(request.options.map(clean).filter((option) => option !== ""))];
|
|
69
|
+
return { request: { ...request, question, options, multiSelect }, leaked };
|
|
70
|
+
}
|
|
71
|
+
export async function runAsk(asked, io) {
|
|
72
|
+
const { request, leaked } = cleanRequest(asked);
|
|
73
|
+
// What was left once the markup was cut out is not a question worth putting to anyone.
|
|
74
|
+
if (leaked && (request.question === "" || (request.options?.length === 0 && request.freeForm !== true))) {
|
|
75
|
+
return ("This question was not asked: its question or options held tool-call markup (<parameter ...>) " +
|
|
76
|
+
"instead of text. Call ask_user again, with question, options and multi_select as separate arguments.");
|
|
77
|
+
}
|
|
78
|
+
const refusal = missingOptions(request);
|
|
79
|
+
if (refusal !== null)
|
|
80
|
+
return refusal;
|
|
81
|
+
// The question, and apart from it what it is about: the dialog shows that above it.
|
|
82
|
+
const trimmed = request.context?.trim() ?? "";
|
|
83
|
+
const context = trimmed !== "" ? trimmed : undefined;
|
|
84
|
+
const options = request.options ?? [];
|
|
85
|
+
if (options.length === 0) {
|
|
86
|
+
return (await io.input(request.question, context)) ?? DISMISSED;
|
|
87
|
+
}
|
|
88
|
+
// Beside the options: typing an answer instead, and - when an agent asked - talking about the question first. Either
|
|
89
|
+
// can be backed out of, to the options again: picked by accident, it costs nothing.
|
|
90
|
+
const extras = [OTHER_OPTION, ...(request.chattable === true ? [CHAT_OPTION] : [])];
|
|
91
|
+
const typeInstead = () => io.input(`${request.question}\n\n${BACK}`, context);
|
|
92
|
+
const chatAbout = () => io.input(`${request.question}\n\nWhat would you like to talk about? ${BACK}`, context);
|
|
93
|
+
if (request.multiSelect !== true) {
|
|
94
|
+
for (;;) {
|
|
95
|
+
const choice = await io.select(request.question, [...options, ...extras], context);
|
|
96
|
+
if (choice === undefined)
|
|
97
|
+
return DISMISSED;
|
|
98
|
+
if (choice === OTHER_OPTION) {
|
|
99
|
+
const typed = await typeInstead();
|
|
100
|
+
if (typedNothing(typed))
|
|
101
|
+
continue;
|
|
102
|
+
return typed;
|
|
103
|
+
}
|
|
104
|
+
if (choice === CHAT_OPTION) {
|
|
105
|
+
const said = await chatAbout();
|
|
106
|
+
if (typedNothing(said))
|
|
107
|
+
continue;
|
|
108
|
+
return chatAnswer(said);
|
|
109
|
+
}
|
|
110
|
+
return choice;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// Pick several: every option a box, ticked and unticked as it is chosen, until they say they are done. What they type
|
|
114
|
+
// is one more box, ticked - and can be unticked too. Something else, Chat about this and Done are no boxes.
|
|
115
|
+
const listed = [...options];
|
|
116
|
+
const ticked = new Set();
|
|
117
|
+
const picked = () => listed.filter((option) => ticked.has(option));
|
|
118
|
+
let at = 0;
|
|
119
|
+
for (;;) {
|
|
120
|
+
const rows = listed.map((option) => `${ticked.has(option) ? TICKED : UNTICKED} ${option}`);
|
|
121
|
+
const choice = await io.select(request.question, [...rows, ...extras, DONE_OPTION], context, at);
|
|
122
|
+
if (choice === undefined || choice === DONE_OPTION)
|
|
123
|
+
break;
|
|
124
|
+
if (choice === OTHER_OPTION) {
|
|
125
|
+
at = listed.length;
|
|
126
|
+
const typed = await typeInstead();
|
|
127
|
+
if (typedNothing(typed))
|
|
128
|
+
continue;
|
|
129
|
+
const option = typed.trim();
|
|
130
|
+
if (!listed.includes(option))
|
|
131
|
+
listed.push(option);
|
|
132
|
+
ticked.add(option);
|
|
133
|
+
at = listed.indexOf(option);
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (choice === CHAT_OPTION) {
|
|
137
|
+
at = listed.length + extras.indexOf(CHAT_OPTION);
|
|
138
|
+
const said = await chatAbout();
|
|
139
|
+
if (typedNothing(said))
|
|
140
|
+
continue;
|
|
141
|
+
return chatAnswer(said, picked());
|
|
142
|
+
}
|
|
143
|
+
// A row, or - where the answer is typed, on the command line - an option by its text, or one more of their own.
|
|
144
|
+
const row = rows.indexOf(choice);
|
|
145
|
+
const option = row !== -1 ? listed[row] : choice.trim();
|
|
146
|
+
if (!listed.includes(option))
|
|
147
|
+
listed.push(option);
|
|
148
|
+
if (ticked.has(option))
|
|
149
|
+
ticked.delete(option);
|
|
150
|
+
else
|
|
151
|
+
ticked.add(option);
|
|
152
|
+
at = listed.indexOf(option);
|
|
153
|
+
}
|
|
154
|
+
return ticked.size > 0 ? picked().join(", ") : DISMISSED;
|
|
155
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import type { ChatLink } from "./chats.ts";
|
|
3
|
+
import type { ScriptKind } from "./regenerate/test-scripts.ts";
|
|
4
|
+
import { SKILL_RUN_ENTRY, SKILL_REPORT_ENTRY } from "./chat-entries.ts";
|
|
5
|
+
/**
|
|
6
|
+
* A skill that runs in the background (`metadata.background: true`, docs/skills-and-gates.md): in the chat, cultivate
|
|
7
|
+
* starts it and returns at once, nothing shows while it runs, and nobody is asked anything. Its end comes back to the
|
|
8
|
+
* chat it was started from once that chat is idle - never interrupting it: one line drawn by turri when it did its work,
|
|
9
|
+
* a message that starts a turn when it did not, for the chat to tell the person and decide what next.
|
|
10
|
+
*/
|
|
11
|
+
/** How a background run ended, for the chat it was started from. */
|
|
12
|
+
export interface SkillRunEnd {
|
|
13
|
+
skill: string;
|
|
14
|
+
/** It did its work: a line, starting no turn. */
|
|
15
|
+
ok: boolean;
|
|
16
|
+
/** The line it is drawn as. */
|
|
17
|
+
line: string;
|
|
18
|
+
/**
|
|
19
|
+
* What the chat's agent is told, in a turn of its own: when it did not do its work - or when what it did is for the
|
|
20
|
+
* chat to tell, as a capture's report is. A run that did its work with a task is drawn as its line too.
|
|
21
|
+
*/
|
|
22
|
+
task?: string;
|
|
23
|
+
/** The testing script it writes, when it writes one. */
|
|
24
|
+
kind?: ScriptKind;
|
|
25
|
+
/** The module it is for, relative to the project, when it was given one. */
|
|
26
|
+
plainFile?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* What a host is told of a background run, besides its skill: the testing script it writes and the module it is for,
|
|
30
|
+
* each when there is one - in cultivate's result as it starts, and in the message a run that did not do its work sends.
|
|
31
|
+
*/
|
|
32
|
+
export declare function runDetails(kind: ScriptKind | undefined, plainFile: string | undefined): {
|
|
33
|
+
kind?: ScriptKind;
|
|
34
|
+
plainFile?: string;
|
|
35
|
+
};
|
|
36
|
+
/** What the agent of a background run is told, besides what the chat passed on. */
|
|
37
|
+
export declare const BACKGROUND_NOTE: string;
|
|
38
|
+
/** What cultivate says as it starts a background run. */
|
|
39
|
+
export declare function startedText(skill: string, options: {
|
|
40
|
+
model?: string;
|
|
41
|
+
plainFile?: string;
|
|
42
|
+
kind?: ScriptKind;
|
|
43
|
+
}): string;
|
|
44
|
+
/**
|
|
45
|
+
* What a background run changed of the files that changed in the project while it ran: the chat goes on meanwhile, and
|
|
46
|
+
* what it writes - its ***plain, its test plain files - is not the run's. A run that writes a testing script changes
|
|
47
|
+
* the script, a prepare script beside a conformance one, and a config file naming them; any other run, all of them.
|
|
48
|
+
*/
|
|
49
|
+
export declare function ownChanges(changed: string[], kind?: ScriptKind): string[];
|
|
50
|
+
/** The line a background run that did its work is drawn as. */
|
|
51
|
+
export declare function doneLine(skill: string, changed: string[], kind?: ScriptKind): string;
|
|
52
|
+
/** What the chat's agent is told when a background run did not do its work: why, and what is left to it. */
|
|
53
|
+
export declare function failedTask(skill: string, why: string, output: string | undefined, kind?: ScriptKind): string;
|
|
54
|
+
/** The line drawn for a background run, in the transcript and in no model's context. */
|
|
55
|
+
export { SKILL_RUN_ENTRY };
|
|
56
|
+
/** What a background run that did its work has for the chat's agent, unseen. */
|
|
57
|
+
export { SKILL_REPORT_ENTRY };
|
|
58
|
+
/** A chat's background runs' ends: held until it is idle - its agent done, nothing typed - then told together. */
|
|
59
|
+
export declare function skillRunDelivery(pi: ExtensionAPI, link: ChatLink, context: () => ExtensionContext | undefined): {
|
|
60
|
+
put(end: SkillRunEnd): void;
|
|
61
|
+
};
|