Skip to content

Add OpenAI Responses API support and improve completion scripts - #1878

Merged
nmaguiar merged 19 commits into
masterfrom
t8
Jul 27, 2026
Merged

Add OpenAI Responses API support and improve completion scripts#1878
nmaguiar merged 19 commits into
masterfrom
t8

Conversation

@nmaguiar

Copy link
Copy Markdown
Collaborator

This pull request makes significant improvements to the shell completion scripts for OpenAF tools, focusing on better handling of subcommands and options, improved output formatting, and enhanced YAML configuration for completions. The changes make completions more accurate and user-friendly, especially for commands with subcommands and nested options.

Shell completion logic and formatting improvements:

  • Added support for "exact" subcommands in completion scripts, ensuring options are only suggested after an explicit subcommand (like install, erase, update), and tracking state with new flags (e.g., _G_EXACT_CHOSEN, *_SEEN). This prevents incorrect suggestions and enables context-aware completions. [1] [2] [3] [4] [5] [6]

  • Switched from echo to printf for outputting completion entries, escaping special characters and supporting tab-separated descriptions, which improves compatibility and display in shells. [1] [2] [3]

YAML completion configuration enhancements:

  • Introduced the exact: true property for subcommands in completion_opack.yaml, making the structure explicit and enabling the improved logic in generated scripts. [1] [2]

Template and utility improvements:

  • Added new template helpers ($sfx, $esc) for argument suffix handling and safe string escaping in completion templates, increasing reliability and maintainability. [1] [2]

Minor fixes:

  • Updated the bash completion script generator to quote the path to the completion script, ensuring correct behavior when paths contain spaces.

These changes collectively make completions more robust, context-aware, and shell-friendly, especially for complex commands with subcommands and nested options.

Copilot AI and others added 18 commits July 4, 2026 04:13
Implement the /responses endpoint integration in owrap.ai.js, including response schema normalization, input text conversion, and error handling. Update AI tests to verify the new responses endpoint usage and JSON schema formatting.
…-support

Add OpenAI JSON Schema (structured output) support to $gpt
Implement detection and preservation of 35511...35511 math blocks during MD2HTML conversion to prevent unwanted HTML processing inside them. Added a new test case to verify that line breaks are preserved within these blocks.
Update dependency versions in pom.xml, pom.json and corresponding jar files in lib/
- Fix race condition in openaf.js parallel results push by using __threads.sync
- Add tool_call_id to tool responses in owrap.ai.js
- Fix argument handling in rawPromptStream to support legacy 6-arg calls
- Correct border character calculation in owrap.format.js dashboards
- Update autoTestAll.Format.js to use visibleLength for alignment checks
- Fix autoTestAll.Server.js by accessing .response on http get calls
- Refactor version checking in opack.js to use ow.format.checkVersionSpec
- Add lib/json-io-4.108.0.jar and lib/java-util-4.108.0.jar
- Update pom.xml, pom.json and versionsAndDeps.json with new deps
- Add TOON format tests and update Format tests
Update the following libraries to their latest versions:
- commons-logging: 1.3.6 -> 1.4.0
- jackson (core, databind, dataformat-toml): 2.22.0 -> 2.22.1
- jetty (client, compression, http, io, util, websocket): 12.1.9 -> 12.1.11
- jna: 5.18.1 -> 5.19.1
- jsch: 2.28.2 -> 2.28.4
- okhttp: 5.3.2 -> 5.4.0
- okio: 3.17.0 -> 3.18.0
- snmp4j-agent: 3.9.1 -> 3.9.2

Updated versions in pom.xml and pom.json.
- Add exact subcommand matching with _G_EXACT_CHOSEN state tracking
- Replace  helper with  and  template helpers
- Improve argument iteration using indexed counter instead of /bin/sh
- Replace echo with printf for safer output in generated scripts
- Update bash/zsh completion JS helpers accordingly
@nmaguiar
nmaguiar merged commit bc3aeb7 into master Jul 27, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Continuous Enhancement Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants