Repository navigation
Add Program Status Protocol support - #8
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
User-facing mode documentation is incomplete, and the core auto/never mode behavior lacks coverage.
2 open findings
What changed in this PR
Adds OSC 7501 query lifecycle reporting while keeping query output and child processor statuses isolated.
Changes:
- Adds configurable
auto,always, andneverstatus modes. - Reports query success, failure, and cancellation states.
- Disables child processor status and adds supporting tests.
| File | Description |
|---|---|
| README.md | Introduces terminal status reporting. |
| internal/programstatus/programstatus.go | Encodes and sanitizes OSC 7501 reports. |
| internal/programstatus/programstatus_test.go | Tests encoding and sanitization. |
| internal/processor/exec.go | Disables status in processor subprocesses. |
| internal/processor/exec_test.go | Tests child environment handling. |
| internal/app/run.go | Integrates status configuration and lifecycle reporting. |
| internal/app/run_test.go | Tests parsing, reporting, and terminal detection. |
| go.mod | Adds the terminal-detection dependency. |
| go.sum | Updates dependency checksums. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+269
to
+270
| if !strings.Contains(stderr.String(), "state=working") || !strings.Contains(stderr.String(), "state=done") { | ||
| t.Fatalf("status output = %q, want working and done", stderr.String()) |
| - **Less query boilerplate** — you write `FROM nebu('token-transfer', ...)` instead of rebuilding the same `read_json('/dev/stdin')` pattern every time. | ||
| - **Schema-aware discovery** — `nebu-sql` uses `--describe-json` to expose processor-specific top-level columns, so the query surface follows the processor contract. | ||
| - **One SQL surface for many processors** — every installed processor that supports `--describe-json` becomes queryable through the same function shape. | ||
| - **Terminal-aware status** — long-running queries report `working`, `done`, `idle`, and `error` through OSC 7501 without mixing status into query results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Verification