Skip to content

Feature/release cli#629

Open
ninan-nn wants to merge 12 commits intoalibaba:mainfrom
ninan-nn:feature/release_cli
Open

Feature/release cli#629
ninan-nn wants to merge 12 commits intoalibaba:mainfrom
ninan-nn:feature/release_cli

Conversation

@ninan-nn
Copy link
Copy Markdown
Collaborator

@ninan-nn ninan-nn commented Apr 2, 2026

Summary

What Changed

1. Reworked the core CLI surface

  • Simplified the root command options and config flow.
  • Renamed the root timeout flag to --request-timeout.
  • Added --use-server-proxy/--no-use-server-proxy.
  • Removed the old top-level exec shortcut and consolidated command execution under osb command ....
  • Removed the old code command group.

2. Expanded task-oriented command groups

  • command
    • Clarified the foreground vs background execution model for command run.
    • Added explicit output-format handling across run/status/logs/interrupt.
    • Added persistent session management with command session create|run|delete.
  • sandbox
    • Expanded lifecycle coverage and improved consistency around create, inspect, health, endpoint, renew, pause, resume, kill, and metrics flows.
  • file
    • Added explicit output-format support across file operations.
    • Improved upload/download behavior to stream file content instead of eagerly loading whole files.
    • Made batch-style commands return more structured results.
  • egress
    • Added a new command group for runtime network egress policy inspection and patching.
  • devops
    • Refined the experimental diagnostics commands to use the shared client/output model.

3. Tightened config and output semantics

  • Root --config now acts as the single config-file selector for the entire invocation.
  • config init and config set no longer take subcommand-local --path; use root --config instead.
  • config show now reports the effective config_path and whether the file exists.
  • config set now fails with a non-zero exit on invalid keys or missing config files instead of silently printing guidance.
  • Output handling is more explicit across commands, especially for machine- and agent-facing flows.

4. Rebuilt the bundled skills system

  • Introduced a bundled skill registry with stable metadata and rendering helpers.
  • Reworked osb skills into a fuller management surface with:
    • list
    • show
    • install
    • uninstall
  • Made install/uninstall non-interactive, idempotent, and correctly fail on invalid usage.
  • Consolidated the built-in skills into 5 clearer entry points:
    • sandbox-lifecycle
    • command-execution
    • file-operations
    • network-egress
    • sandbox-troubleshooting
  • Merged the older troubleshooting/diagnostics split into the new sandbox-troubleshooting skill.
  • Removed config-bootstrap as a standalone built-in skill and folded that guidance into the task skills.
  • Updated skill examples so agent-facing command snippets explicitly specify output modes like -o json or -o raw.

5. Docs, help text, and release validation

  • Rewrote the CLI README from a normal user perspective and removed stale references.
  • Refreshed help text coverage and related tests.
  • Added stronger validation to the CLI publish workflow:
    • uv sync --frozen
    • uv run ruff check .
    • uv run pyright
    • uv run pytest

6. Test coverage refresh

  • Expanded command/config/help coverage.
  • Reworked skill tests to validate against the real Click command tree instead of relying mainly on low-signal string checks.
  • Added checks to keep skill examples aligned with actual CLI commands and explicit output contracts.

Breaking Changes

  • Yes
  • osb exec ... has been removed.
    Migration: use osb command run ... -- <cmd>.
  • The code command group has been removed.
  • Root --timeout has been renamed to --request-timeout.
  • osb config init --path ... and osb config set --path ... have been removed.
    Migration: use root --config, for example osb --config /path/to/config.toml config set ....
  • Built-in skill names/layout changed.
    Migration: use the new built-ins listed above, especially sandbox-troubleshooting in place of the previous troubleshooting split.

Testing

  • Not run (explain why)
  • Unit tests
  • Integration tests
  • e2e / manual verification
  • uv run pytest tests/test_skills.py
  • uv run pytest tests/test_skills.py tests/test_cli_help.py tests/test_commands.py -k 'Skills or TestConfig'
  • uv run pytest tests/test_cli_help.py
  • uv run pytest tests/test_commands.py -k 'TestConfig'
  • Manual help verification:
    • uv run osb skills --help
    • uv run osb skills install --help
    • uv run osb config --help
    • uv run osb config init --help
    • uv run osb config set --help

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

@ninan-nn ninan-nn force-pushed the feature/release_cli branch 3 times, most recently from 8aa528f to d0c11f8 Compare April 3, 2026 03:35
@Pangjiping Pangjiping marked this pull request as ready for review April 7, 2026 02:50
Pangjiping
Pangjiping previously approved these changes Apr 7, 2026
Copy link
Copy Markdown
Collaborator

@Pangjiping Pangjiping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcf07e7e7c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ninan-nn ninan-nn force-pushed the feature/release_cli branch from bcf07e7 to a80c2eb Compare April 7, 2026 07:23
@ninan-nn ninan-nn marked this pull request as draft April 7, 2026 07:23
@ninan-nn ninan-nn force-pushed the feature/release_cli branch 3 times, most recently from 06c0f93 to 379b038 Compare April 8, 2026 05:00
@ninan-nn ninan-nn force-pushed the feature/release_cli branch from 379b038 to 68dc65f Compare April 8, 2026 05:03
@ninan-nn ninan-nn marked this pull request as ready for review April 8, 2026 08:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68dc65f9fe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


resp = httpx.get(url, headers=headers, params=params, timeout=timeout)
client = obj.get_devops_client()
resp = client.get(f"/sandboxes/{sandbox_id}/diagnostics/{endpoint}", params=params)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use relative diagnostics path to preserve API prefix

_fetch_plain_text now calls client.get with a leading /, which turns the request path into an absolute path and drops the /v1 suffix embedded in ClientContext.get_devops_client() base URL. That sends DevOps requests to /sandboxes/... instead of /v1/sandboxes/..., so these commands fail behind gateways/proxies that expose only the versioned API prefix.

Useful? React with 👍 / 👎.

"id": sandbox.id,
"image": image,
"status": "created",
"timeout": "manual-cleanup" if timeout is None else str(timeout),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Report timeout based on whether timeout was actually set

The success payload always prints "manual-cleanup" when local timeout is None, but this command only passes timeout to SandboxSync.create when timeout_is_set is true. If the user omits --timeout and has no default timeout configured, the SDK default TTL still applies, yet the CLI reports manual cleanup mode, which misrepresents the sandbox lifetime and can mislead automation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sandbox cli skills and optimization before release 0.1.0

2 participants