본문으로 건너뛰기
cccskills
무료GitHub에 공개

trae-native-debug

Maintain, debug, and recover MTGA's Trae native custom-model route. Use when Trae native integration fails, Trae updates shift ai_agent.dll hook offsets, errors such as 4028/4054/429 appear, native rewriter or SseOpenPayload URL rewriting needs diagnosis, or Codex needs to avoid repeating prior renderer-JS/private-protocol dead ends.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md3.6 KB
  • agents/openai.yaml238 B
  • references/native-route-map.md3.2 KB
  • references/update-recovery.md2.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Trae Native Debug

Operating Rules

  • Treat the active integration point as native Rust-side URL rewriting in ai_agent.dll, not renderer JS.
  • Prefer the existing runtime path in python-src/modules/trae_patch/ and service glue in python-src/modules/services/trae_native_route.py.
  • Keep python-src/scripts/trae_patch/ for repro, CDP triggering, and maintenance probes only. Do not move runtime-required code back into scripts.
  • Do not hand-roll Trae private SSE/WebSocket events unless the user explicitly asks to compare alternatives. The current goal is to reuse Trae's native parser by rewriting the outgoing request URL before reqwest.
  • Avoid noisy foreground probes. Capture long output to files or existing JSONL logs, summarize only the relevant events, and stop background processes when done.
  • Do not stage changes unless the user explicitly asks. This project has a history of large touched sets during Trae debugging.

Workflow

  1. Classify the failure before changing code.

    • 4028: generic Trae custom-model failure. It can mean auth, unreachable local service, wrong URL, 4xx, or malformed response.
    • 4054: usually means Trae's native/custom-model tunnel path rejected or could not consume the stream; prior private protocol hand-roll attempts hit this.
    • 429: usually caused by repeated live upstream probes or duplicate requests; throttle and inspect request counts before blaming auth.
  2. Confirm which path is under test.

    • Native route should launch Trae with CDP, start local loopback on 127.0.0.1:18083, and run the native rewriter.
    • Legacy reverse-hosts route is separate. Shared proxy behavior such as config hot update should flow through ProxyApp.apply_runtime_config().
    • If debugging a route choice or UI config, inspect settings/state first; otherwise stay native.
  3. Reproduce with the smallest useful surface.

    • For module availability: uv run python -m modules.trae_patch.trae_native_sse_open_url_rewriter --help
    • For byte-pattern drift: run scripts/trae_patch/trae_native_byte_pattern.py with the known URL-copy pattern.
    • For a real custom-model session: use scripts/trae_patch/trae_native_custom_model_session.py.
    • For UI-triggered repro without manual clicking: use scripts/trae_patch/trae_cdp_send_chat.py.
  4. If Trae updated or offsets moved, read references/update-recovery.md.

  5. If unsure why a prior approach is rejected, read references/native-route-map.md before creating new probes.

Known Stable Facts

  • The useful native chain is: CustomModelProxyManager -> official custom-model WebSocket tunnel -> SSE instruction -> reqwest -> user base_url.
  • The current patch avoids Trae's private tunnel protocol by rewriting the final URL used for the outgoing OpenAI-compatible request.
  • Renderer/global scans for BootConfig, MNI channel interception, and hand-built JS/internal events were negative or higher-maintenance routes.
  • The known URL-copy byte pattern is 48 8b 52 08 4d 8b 46 10 48 8d 8d 20 01 00 00; the call offset used by the rewriter is 0x0F.

Resources

  • references/native-route-map.md: architecture, file map, and prior dead ends.
  • references/update-recovery.md: procedure for recovering after Trae version changes or breakpoint drift.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

ast-grep

무료

Write and debug ast-grep rules for structural code search and rewrite. Use when tasks require AST-aware matching (not plain text), such as finding specific syntax shapes, relational patterns (inside/has), composite logic (all/any/not), or precise code refactors across a codebase.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

gh-cli

무료

使用 GitHub CLI (`gh`) 执行非交互式 GitHub 协作与自动化任务(PR、Issue、Actions、Release、API 查询/修改)。当用户要求“用 gh 命令完成任务”、需要结构化 JSON 输出(`--json`/`--jq`)、批量处理 PR/Issue(如“批量 review 多个 PR”)、按策略合并(如“检查通过后自动 squash 合并”)时使用此 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

pwsh

무료

在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 `--jq`/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

tauri

무료

构建、调试与发布 Tauri v2 应用的工程化工作流。覆盖项目初始化(create-tauri-app)、前端与 Rust 命令通信(`#[tauri::command]` + `invoke`)、状态管理、Capabilities 权限建模、插件接入、跨平台构建与问题排查。当用户需求涉及“创建 Tauri 项目”“把 Web 前端接到 Rust 后端”“最小权限配置(fs/http/shell)”“接入 Tauri 官方插件”“执行 tauri dev/build”“排查 Tauri 构建或运行错误”时使用此 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

UI/UX design intelligence with searchable database

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

uv

무료

在 Windows/macOS/Linux 上使用 `uv` 执行 Python 运行、依赖同步、锁文件管理、Python 版本管理与工具命令(`uv run`、`uv sync`、`uv lock`、`uv python`、`uv tool`)。当任务涉及“用 uv 运行脚本/命令”“临时依赖(`--with`)”“锁文件一致性(`--locked`/`--frozen`)”“跨平台 shell(bash/zsh/PowerShell)下排查 uv 执行问题”时使用此 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

BiFangKNT/mtga1.2천2026년 6월 18일 업데이트

BiFangKNT의 스킬 모두 보기

이 스킬의 문제 신고