Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(exec): 程序化工具调用(run_code/PTC)——一次程序替代多轮工具往返(C 端低开销核心杠杆,借 DSH ptc-runtime)

Aperta
#134 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, rust
Ambito
ai, backend

Direzione di ricerca

Read the proposed DSH reference points: packages/ptc-runtime/README.md, ptc-runtime-node/src/process.ts, ptc-runtime-node/src/index.ts, ptc-runtime/src/index.ts, output-ledger.ts, and bootstrap.ts. First inspect the repository’s tool registration and preset mechanism, including dependency #127; the issue does not name their files. Done means run_code supports batched tool calls, budget and invalid-binding tests pass, and benchmark #129 shows lower token use and wall time.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:depends-on: #127 · 来源:DSH ptc-runtime 包借鉴(jeffkit 拍板跟进)

基线 HEAD = 4e1aee98。

Summary

C 端"高密度低开销"的核心杠杆缺失:recursive 无程序化工具调用——每次工具调用都是一个 ReAct step(一轮 LLM 往返 + KV 重算)。批量场景(>5 次同类调用 + 结果筛选/去重/统计/汇总)在 DSH 是一次 run_code 程序。

参照 DSH packages/ptc-runtime/(PTC=PTC 模式配套执行缝):

  • 模型写程序、工具当函数调:程序只回 stdout/返回值;一次运行替代多轮往返(packages/ptc-runtime/README.md:12)。
  • 执行契约:每次运行全新进程、process.env 置空字典、只保留可执行搜索/系统/临时路径(ptc-runtime-node/src/process.ts:26-30);三预算——超时 120s(上限 600s)/输出 64MiB/堆 512MiB(ptc-runtime-node/src/index.ts:55-61)。
  • 正交失败分类:exception / timeout / abort / worker-exit / invalid-output / output-limit / protocol / sandbox-unavailable——sandbox 事实与成败分开报告(README:129-130)。
  • 跨语言可移植绑定名:RESERVED_BINDING_GLOBALS + RESERVED_ERROR_MEMBERS + PORTABLE_RESERVED_WORDS(ECMAScript∪Python 保留字),绑定名非法在 run 前被拒——一份 bindings 列表对所有后端有效(ptc-runtime/src/index.ts:42-78)。
  • 输出账本有序截断:预算计入"序列化日志 + 完成值",超限返回 output-limit 并保留最大可容纳前缀(output-ledger.ts:24-64);console shim 只有 5 个方法(bootstrap.ts:98-115)。

建议

  1. run_code 工具:模型写程序(JS(或 Rust 之外选定语言))内以函数方式调用已注册工具,只回 stdout/返回值;
  2. 执行沙箱照 DSH 契约:全新进程 + 空环境 + 三预算 + 正交失败分类;
  3. 绑定名可移植性与 run 前校验;
  4. 以 preset 档位挂载(#127 的档位机制),默认关、按需开。

验收

  • 批量任务(≥5 次同类调用 + 结果聚合)改单次 run_code 后 token 与墙钟显著下降(由 benchmark #129 出数);
  • 三预算各有一条超限测试(超时/输出/堆)且失败分类正确;
  • 非法绑定名在 run 前被拒(不消耗一次执行)。
Lingua principale
Rust
Stelle
4
Fork
0
Merge medio
5h 32m
PR unite (30g)
7

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jeffkit/recursive

Tutte le issue di jeffkit/recursive

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.