kyo-experiment: a Kyo adapter for the one-shot query (slice 01-kyo-query) #80
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/claude-code-query!80
Loading…
Reference in a new issue
No description provided.
Delete branch "kyo-experiment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
One
--localslice of thekyo-experimenteffort:01-kyo-query.Slice 01-kyo-query — Kyo one-shot query
Goal: run a one-shot query through a Kyo module against the real CLI, watch it stream, and read it beside
zio's anddirect'squerywell enough to write trusted verdict reasons on the three axes.Fit test: Michal runs
./mill kyo.run "<prompt>", reads the code beside the baseline, and writes the first SDK-verdict reasons, each at file:line on both sides.Fit read (2026-09-29): "the basic Kyo code is comparable and for me esthetically pleasing" — too soon to decide the stack; the effort continues.
Done
kyoMill module, unpublished: Kyo 1.0.0-RC7 withkyo-system, Scala 3.9.0, Java 25 (KX-D6).ClaudeCode.queryasStream[Message, Async & Abort[CLIError] & Scope]: the consumer's scope ends the CLI and its whole process tree (KX-D5);querySync/queryResult/askover it.Env[ExecutableLookup]; stderr beside stdout; typed errors for exit code, parse errors, timeout (authoritative), cwd and environment checks../mill kyo.run "<prompt>", one line per message as it arrives.kyo.test), stand-in process and live file-system integration plus real-CLI E2E (kyo.itest).core, approved by Michal, shared by all adapters:CLIArgumentBuilder.buildQueryArgs(KX-D2),Message.answerText(KX-D3) answering with the run's result asclaude -pdoes (KX-D4),MessageandContentBlockderiveCanEqual.project-management/efforts/kyo-experiment/slices/01-kyo-query/friction.md(friction log and reading index), incl. RC7's scope close waiting for fibers, and whatkyo-aialready does with the Claude CLI.Behaviour change in the published adapters:
queryResultandaskinzio,directandeffectfulnow return the result message's text, else the last assistant text (KX-D4), where they returned the first assistant message's first text block.Review
Close review with 8 skills:
project-management/efforts/kyo-experiment/slices/01-kyo-query/review-slice-20260929-091125.md. One critical finding rejected with evidence (direct/effectfulrefuse structured input before any process). Fixed:0f141b9(prompt out of the start log),e30e4f1(no root paths without HOME),73c3570and1e3dd83(tests pinning tree kill, stdin, a split character, every branch ofanswerText). Gate:__.compile,__.test,kyo.itest(24),__.checkFormat, no warnings.Follow-ups (parked; flushed to the effort map)
api_error_status/erroranswerTextreturns anisErrorresult as the answercwdError,environmentError, query stdin, install paths) →coreProcessExecutionError(-1, …)queryResulttest and a release note for KX-D4; ARCHITECTURE.md:corestays on 3.3kyo: timeout can win after a clean finish;whichfailing reads as "Node.js not found"; runner exits 0 on usage error;ClaudeCode.querywiring tested only by E2E; "timed out after 0 seconds"kyo-sessiondirectmay leave the CLI running on early stop), iterative-works/iw-project-support#4 (house LTS version)🤖 Generated with Claude Code