Skip to content

📦 new: add devin cli support and model selection - #10

Open
warengonzaga wants to merge 4 commits into
devfrom
feature/devin-cli-model-selector
Open

warengonzaga wants to merge 4 commits into
devfrom
feature/devin-cli-model-selector

Conversation

@warengonzaga

@warengonzaga warengonzaga commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • add Telegram /new and /model controls for selecting copilot/devin and model ids
  • persist per-conversation �gent,
    epository, and nullable model (with migration-safe DB updates)
  • implement Devin main-session execution path in runner with default model swe-1.7
  • pass optional Devin credentials into sandboxes and update docs/env guidance

Validation

  • bun test
  • bun run typecheck
  • bun run lint
  • bun run build

View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 03:21
@warengonzaga warengonzaga added enhancement [Type] New feature or improvement to existing functionality [issues, PRs] interface [Area] User-facing layer — UI, CLI, API endpoints, or SDK surface [issues, PRs] labels Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

🔧 Container Build Complete - PR Build

Build Status: ✅ Success
Flow Type: pr
Description: Feature development and testing


📦 Pull Image

Docker Hub: docker pull wgtechlabs/glasses:pr-6818050
GHCR: docker pull ghcr.io/wgtechlabs/glasses:pr-6818050

📋 Build Details

Property Value
Flow Type pr
Commit aeed2e5
Registry Docker Hub + GHCR

🏷️ Image Tags

wgtechlabs/glasses:pr-6818050
wgtechlabs/glasses:pr
ghcr.io/wgtechlabs/glasses:pr-6818050
ghcr.io/wgtechlabs/glasses:pr


🔍 Testing Your Changes

  1. Pull the image using one of the commands above
  2. Run the container with your test configuration
  3. Verify the changes work as expected
  4. Report any issues in this PR

🚀 Quick Start

# Pull and run the container
Docker Hub: docker pull wgtechlabs/glasses:pr-6818050
docker run <your-options> <image>


🔒 Security Scan Results

📋 Pre-Build Security Checks

Source Code Scan: 0 vulnerabilities found
Dockerfile Scan: 0 misconfigurations found

🐳 Container Image Vulnerabilities

Severity Count
Total 0

📊 Detailed Security Reports

View detailed vulnerability reports in the GitHub Security tab.


🤖 Powered by Container Build Flow Action v7df0af8c4395db7df1927ef215445cd546e9e3f2
💻 with ❤️ by Waren Gonzaga under WG Technology Labs, and Him 🙏

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Devin CLI as an additional main-session backend alongside Copilot, with Telegram commands to pin the active agent/repository and optionally select a model per conversation, persisting these settings in Postgres and propagating them through the scheduler/runner pipeline.

Changes:

  • Add Telegram /new and /model controls to configure per-chat agent/repository/model.
  • Extend conversation persistence (DB + types) to include agent, repository, and nullable model, and pass these through to runner inputs.
  • Implement a Devin main-session execution path in the runner (with default model swe-1.7) and optionally inject Devin credentials into sandboxes.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/telegram.test.ts Updates Telegram control-chat tests for /new and /model.
src/types.ts Introduces AgentName and extends Conversation with agent/repository/model.
src/scheduler.ts Passes agent/model/repository into runner inputs; adjusts sandbox creation token behavior.
src/sandbox.ts Makes main sandbox token optional and passes optional DEVIN_CREDENTIALS_BASE64 into sandbox env.
src/runner.ts Adds runner input validation for agent/model and a Devin main execution path (devin -p).
src/runner-protocol.ts Extends RunnerInput protocol with agent and model.
src/db.ts Adds model column and adds configureMainConversation for migration-safe per-chat config updates.
src/channels/telegram.ts Implements /new and /model handlers and surfaces agent/model/repository in /status.
README.md Documents new Telegram commands and Devin support/environment variables.
docs/ARCHITECTURE.md Updates architecture docs to describe Copilot vs Devin main-session behavior.
.env.example Adds DEVIN_CREDENTIALS_BASE64 guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/channels/telegram.ts Outdated
Comment thread src/channels/telegram.ts Outdated
Comment thread src/runner.ts Outdated
Comment thread README.md Outdated
warengonzaga and others added 3 commits July 13, 2026 03:31
- /new and /model now destroy the previously running main sandbox instead of only nulling its DB pointer, preventing orphaned idle sandboxes until timeout
- ensureDevinReady surfaces a clear auth-failure message on stderr instead of redirecting devin auth status to /dev/null
- README: describe the main session as agent-agnostic (Copilot by default) and drop the stale '/new is compatibility-only' line

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The DEVIN_CREDENTIALS_BASE64 value in tests/config.test.ts is a fake base64 fixture ('devin-creds'), not a real secret, but Gitleaks' generic-api-key rule flags the credential-like assignment and fails the CI gate.

- Add .gitleaksignore with the finding fingerprint to suppress the original introduction in the branch's commit-range scan.
- Add an inline gitleaks:allow on the fixture line so future/squashed history and full-tree scans stay clean.

Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement [Type] New feature or improvement to existing functionality [issues, PRs] interface [Area] User-facing layer — UI, CLI, API endpoints, or SDK surface [issues, PRs]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants