Skip to content

docs: add Qoder Cloud runtime integration best practice and demo - #6

Merged
anchenqlw merged 3 commits into
QoderAI:mainfrom
yefengzi7:feat/integrate-qoder-cloud-runtime
Aug 14, 2026
Merged

docs: add Qoder Cloud runtime integration best practice and demo#6
anchenqlw merged 3 commits into
QoderAI:mainfrom
yefengzi7:feat/integrate-qoder-cloud-runtime

Conversation

@yefengzi7

Copy link
Copy Markdown
Contributor

Cookbook contribution

Summary

  • Content type: Best Practice
  • Locale: zh-CN
  • Demo source included: yes
  • Target audience: 已有 Agent 编排或派活系统、希望把 Qoder Cloud 接成其中一种运行时的后端开发者。
  • User problem and expected outcome: 如何把托管 Agent 运行时接入自有系统,并把自己的业务能力以客户端自定义工具的形式安全暴露给云端 Agent。文章覆盖 SSE 断线续传、批次 requires_action 协议、重放不重复执行、fail-closed 兜底与令牌隔离,并明确说明「恰好一次」的真实保证边界,避免把它讲得比实际能保证的更大。

Sources and assets

  • Public sources used: Multica(https://github.com/multica-ai/multica)。本文的接入模式提炼自该开源项目把 Qoder Cloud 作为 Agent 运行时的实践;Demo 中的自定义工具名与输入约束沿用 Multica 已文档化的工具契约。
  • Asset owner and license: 无图片与第三方素材。Demo 为本次贡献新编写的自包含 Go 模块,仅依赖 Go 标准库,未复制 Multica 的源码,按本仓库条款以 Apache-2.0 贡献。
  • If fully original, state: All submitted code and text are original; the described protocol pattern is derived from Multica's public integration and its documented tool contract.

Specialist review

  • 暂无指定复核人。如需产品或安全侧专项复核,请在评论中指出。

Author checklist

  • I used exactly one author and no more than five approved tags.
  • The article has at least three ## sections and no hand-written table of contents.
  • I did not use GitHub Alerts, video, raw HTML, JavaScript, MDX, iframe, remote images, SVG, or interactive content.
  • Images are local PNG, JPEG, or WebP files with meaningful alternative text and documented rights.
  • The contribution contains no credentials, customer data, personal information, internal links, or unreleased capabilities.
  • If a Demo is included, demos/<slug>/ matches the owner article, and the article contains the exact GitHub Demo link.
  • If a Demo is included, its README documents prerequisites, setup, run, verification, cleanup, and cost/safety considerations.
  • Demo configuration uses placeholders; no dependency cache, build output, binary, archive, nested Git metadata, or symbolic link is included.
  • I disclosed the origin and license of Demo source, dependencies, fixtures, and third-party assets.
  • I reviewed the generated preview locally or from the required GitHub Actions checks.
  • Every commit contains a Signed-off-by trailer.
  • I understand that maintainer Merge to main is the publication event.

Maintainer Demo review

  • Not applicable, or a Maintainer reviewed the Demo README and source manually.
  • Not applicable, or the claimed result, cleanup, billable operations, permissions, and destructive side effects were reviewed.

Signed-off-by: 时之 <yefengzi888@gmail.com>
@yefengzi7
yefengzi7 requested a review from anchenqlw as a code owner August 14, 2026 03:18
Copilot AI lite review requested due to automatic review settings August 14, 2026 03:18

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

Adds a zh-CN best-practice article plus a self-contained Go demo module illustrating how to integrate Qoder Cloud as a hosted runtime behind an existing orchestrator, focusing on SSE resume/dedup, requires_action batch execution with replay safety, and a fail-closed allowlisted custom-tool dispatcher.

Changes:

  • New zh-CN best-practice article documenting the recommended integration pattern and its guarantee boundaries.
  • New Go demo module implementing dispatcher + batch runner + SSE stream reader, with tests and runnable README.
  • New demo go.mod for a zero-dependency, standard-library-only build.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
demos/integrate-qoder-cloud-runtime/stream.go Implements SSE reader with resume + dedup logic for the demo
demos/integrate-qoder-cloud-runtime/dispatcher.go Implements allowlisted, scoped, strict JSON validation dispatcher for custom tools
demos/integrate-qoder-cloud-runtime/bridge.go Implements buffered batch execution + replay-safe result caching (“exactly once within process”)
demos/integrate-qoder-cloud-runtime/bridge_test.go Tests batch replay semantics and SSE resume/dedup behavior
demos/integrate-qoder-cloud-runtime/dispatcher_test.go Tests dispatcher validation and scope enforcement
demos/integrate-qoder-cloud-runtime/README.md Demo usage, verification steps, and security/cost notes
demos/integrate-qoder-cloud-runtime/go.mod Declares standalone demo module and Go version
content/zh-CN/best-practices/integrate-qoder-cloud-runtime/index.md Best-practice documentation (zh-CN) and demo link

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread demos/integrate-qoder-cloud-runtime/stream.go Outdated
Comment thread demos/integrate-qoder-cloud-runtime/dispatcher.go
Comment thread demos/integrate-qoder-cloud-runtime/bridge.go
- Buffer: ignore duplicate event IDs so the exactly-once key can't be hijacked
- strictUnmarshal: reject trailing JSON tokens (require exactly one value)
- stream: parse SSE incrementally so handle/stop apply on long-lived streams

Signed-off-by: 时之 <yefengzi888@gmail.com>
…r-cloud-runtime

Signed-off-by: 时之 <yefengzi888@gmail.com>
@anchenqlw
anchenqlw merged commit c958b56 into QoderAI:main Aug 14, 2026
3 checks passed
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.

3 participants