Skip to content

Conversation

@sestinj
Copy link
Contributor

@sestinj sestinj commented Sep 26, 2025

Summary by cubic

Adds a --id option to connect to an existing remote agent via a tunnel, with improved flow and error handling for the remote command. Also updates start-mode JSON output and tests.

  • New Features

    • Add --id to connect via POST /agents/:id/tunnel.
    • Support --id with --start to print JSON and skip TUI.
    • Keep direct URL mode; prints JSON in --start.
    • Update CLI help text to include --id.
  • Refactors

    • Split logic into small functions (prompt resolution, URL connect, agent tunnel, environment creation, TUI launch, error handling).
    • Add AuthenticationRequiredError and consistent gracefulExit.
    • Build request body only includes idempotencyKey when provided; branchName optional.
    • Add tests for --id flow and --id + --start JSON output.

@sestinj sestinj requested a review from a team as a code owner September 26, 2025 18:20
@sestinj sestinj requested review from RomneyDa and removed request for a team September 26, 2025 18:20
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 26, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="extensions/cli/src/commands/remote.ts">

<violation number="1" location="extensions/cli/src/commands/remote.ts:253">
Rule violated: **Don&#39;t use console.log**

Route this output through the logger to comply with the &quot;Don&#39;t use console.log&quot; rule and keep logging consistent.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

);
await gracefulExit(1);
function printStartJson(payload: Record<string, unknown>) {
console.log(JSON.stringify(payload));
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Sep 26, 2025

Choose a reason for hiding this comment

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

Rule violated: Don't use console.log

Route this output through the logger to comply with the "Don't use console.log" rule and keep logging consistent.

Prompt for AI agents
Address the following comment on extensions/cli/src/commands/remote.ts at line 253:

<comment>Route this output through the logger to comply with the &quot;Don&#39;t use console.log&quot; rule and keep logging consistent.</comment>

<file context>
@@ -9,155 +9,258 @@ import { getRepoUrl } from &quot;../util/git.js&quot;;
-    );
-    await gracefulExit(1);
+function printStartJson(payload: Record&lt;string, unknown&gt;) {
+  console.log(JSON.stringify(payload));
+}
+
</file context>
Fix with Cubic

@sestinj sestinj merged commit 775f731 into main Sep 27, 2025
81 of 87 checks passed
@sestinj sestinj deleted the nate/fix-remote-id branch September 27, 2025 00:31
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Sep 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2025
@github-actions github-actions bot added the tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys label Sep 27, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Sep 29, 2025

🎉 This PR is included in version 1.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor Author

sestinj commented Oct 1, 2025

🎉 This PR is included in version 1.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor Author

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

released size:L This PR changes 100-499 lines, ignoring generated files. tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants