diff --git a/.github/workflows/vscode-extension.yaml b/.github/workflows/vscode-extension.yaml index 1dea8f6..3941252 100644 --- a/.github/workflows/vscode-extension.yaml +++ b/.github/workflows/vscode-extension.yaml @@ -168,7 +168,7 @@ jobs: name: Publish to Marketplace needs: build-vsix runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 39cd19f..d9b6383 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -843,6 +843,12 @@ dependencies = [ "syn", ] +[[package]] +name = "env_home" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" + [[package]] name = "equivalent" version = "1.0.2" @@ -1961,6 +1967,7 @@ dependencies = [ "tui-textarea", "utoipa", "uuid", + "which", ] [[package]] @@ -3641,6 +3648,18 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "which" +version = "7.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762" +dependencies = [ + "either", + "env_home", + "rustix 1.1.2", + "winsafe", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4133,6 +4152,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + [[package]] name = "wit-bindgen" version = "0.46.0" diff --git a/Cargo.toml b/Cargo.toml index 7bb5338..98fb2a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,7 @@ regex = "1" once_cell = "1" lazy_static = "1" backon = "1" +which = "7" # System info (for core count) sysinfo = "0.32" diff --git a/README.md b/README.md index ab21603..bd9cb59 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Operator! logo](./img/operator_logo.svg) +![Operator! logo](docs/assets/img/operator_logo.svg) # Operator! diff --git a/bindings/OperatorOutput.ts b/bindings/OperatorOutput.ts new file mode 100644 index 0000000..1bf562c --- /dev/null +++ b/bindings/OperatorOutput.ts @@ -0,0 +1,53 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Standardized agent output for progress tracking and step transitions. + * + * Agents output a status block in their response which is parsed into this structure. + * Used for progress tracking, loop detection, and intelligent step transitions. + */ +export type OperatorOutput = { +/** + * Current work status: in_progress, complete, blocked, failed + */ +status: string, +/** + * Agent signals done with step (true) or more work remains (false) + */ +exit_signal: boolean, +/** + * Agent's confidence in completion (0-100%) + */ +confidence: number | null, +/** + * Number of files changed this iteration + */ +files_modified: number | null, +/** + * Test suite status: passing, failing, skipped, not_run + */ +tests_status: string | null, +/** + * Number of errors encountered + */ +error_count: number | null, +/** + * Number of sub-tasks completed this iteration + */ +tasks_completed: number | null, +/** + * Estimated remaining sub-tasks + */ +tasks_remaining: number | null, +/** + * Brief description of work done (max 500 chars) + */ +summary: string | null, +/** + * Suggested next action (max 200 chars) + */ +recommendation: string | null, +/** + * Issues preventing progress (signals intervention needed) + */ +blockers: Array | null, }; diff --git a/bindings/StepCompleteRequest.ts b/bindings/StepCompleteRequest.ts index cae31d9..9bfbb61 100644 --- a/bindings/StepCompleteRequest.ts +++ b/bindings/StepCompleteRequest.ts @@ -1,4 +1,5 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { OperatorOutput } from "./OperatorOutput"; /** * Request to report step completion (from opr8r wrapper) @@ -27,4 +28,8 @@ duration_secs: bigint, /** * Sample of the output (first N chars for debugging) */ -output_sample: string | null, }; +output_sample: string | null, +/** + * Structured output from agent (parsed OPERATOR_STATUS block) + */ +output: OperatorOutput | null, }; diff --git a/bindings/StepCompleteResponse.ts b/bindings/StepCompleteResponse.ts index 37e1340..1865da2 100644 --- a/bindings/StepCompleteResponse.ts +++ b/bindings/StepCompleteResponse.ts @@ -6,7 +6,7 @@ import type { NextStepInfo } from "./NextStepInfo"; */ export type StepCompleteResponse = { /** - * Status of the step: "completed", "awaiting_review", "failed" + * Status of the step: "completed", "awaiting_review", "failed", "iterate" */ status: string, /** @@ -20,4 +20,36 @@ auto_proceed: boolean, /** * Command to execute for the next step (opr8r wrapped) */ -next_command: string | null, }; +next_command: string | null, +/** + * Whether OperatorOutput was successfully parsed from agent output + */ +output_valid: boolean, +/** + * Agent has more work (exit_signal=false) - indicates iteration needed + */ +should_iterate: boolean, +/** + * How many times this step has run (for circuit breaker) + */ +iteration_count: number, +/** + * Circuit breaker state: closed (normal), half_open (monitoring), open (halted) + */ +circuit_state: string, +/** + * Summary from previous step's OperatorOutput + */ +previous_summary: string | null, +/** + * Recommendation from previous step's OperatorOutput + */ +previous_recommendation: string | null, +/** + * Cumulative files modified across iterations + */ +cumulative_files_modified: number, +/** + * Cumulative errors across iterations + */ +cumulative_errors: number, }; diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 807a1c1..da2637c 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -4,8 +4,8 @@ {% if page.title %}{{ page.title }} | {% endif %}{{ site.title }} - - + +