Repository navigation
[dsh-superagent] Support multiple isolated instances in one profile, or a first-class multi-repo mode #11947
Replies: 1 comment
|
Independent confirmation from a second deployment, plus one gap this post does not cover. Setup. dsh-superagent 0.1.0 ( The gap: with a non-GitHub Source the worker is never told which project it is in. Minimal incremental ask (a subset of Option 2, no instance namespacing needed):
This keeps one process, one panel, one settings page and one queue; Option 1 remains the better answer for genuinely independent deployments, and the two compose. Direction question. If (1)-(3) is acceptable as the first step, we would rather send a patch than another proposal: we can prototype it in a fork and open a PR on dsh-superagent-prototype so you can decide with the diff in hand. If you would split it differently (for example per-repository Policy first), naming the first one you would take is enough for us to align. 中文摘要:我们在"只开 Feishu 来源、关掉 GitHub 来源"的部署里复现了同一个限制,并补一个原文没覆盖的点: |
Uh oh!
There was an error while loading. Please reload this page.
Summary
dsh-superagent-prototypecurrently supports exactly one SuperAgent instance per DSH profile/process. Monitoring a second repository means creating a second profile with a different port andstateDir, then re-entering every setting: GitHub account/repository, Policy, prompts, executor/prepare, and Feishu bot/chats. The existing Web GUI also cannot show the second instance in its sidebar.I would like to request either of these, in order of preference:
instanceIdnamespace for services/routes/panels/presets/health and a separatestateDirper instance.At minimum, a supported way to clone a profile's settings (without secrets) into a companion profile would remove most of the repeated setup.
Why this matters
A team often has several repositories but wants one operator surface: one model provider, one set of prompt conventions, one place to see queues and attention. Today each repository is a separate process, port, state database, main Session, Feishu consumer, and a full copy of settings. There is no clone/import, and the 3082 sidebar cannot expose the second instance.
This is a configuration/UX problem before it is a compute problem: the second instance is functionally identical except for a few values (repository, account, state directory, port, bot).
Current blockers (from the code)
Adding a second
dsh-superagententry to the same profile collides on:RuntimeisService('orchestrator')(src/app/runtime.ts) — one service per process./orchestrator/api(src/app/http.ts); the client fetches that fixed path (src/client/api.ts).PANEL_ID/ENTRY=dsh-superagent, with the labelSuperagent(src/client/index.tsx).dsh-superagent-router/dsh-superagent-worker(cordis.patch.yml).github,feishu,history, and the effect names are global.stateDiris protected by a process lock; one runtime per state directory.repository; thread keys aregithub:<number>without a repository component, so two repositories with the same issue/PR number collide.A second profile avoids the conflict, but it is a separate process, port, state DB, main Session, Feishu event consumer, and a full settings copy. Re-entering the configuration is the main pain point.
Proposal
Option 1: instance namespacing
Add an
instanceId(orprefix) used for:orchestratorservice name,/orchestrator/<id>/api),Then allow:
The sidebar could list
SuperagentandSuperagent (work). Each instance keeps its own state DB, Sessions, Policy, and worker slots, but shares the profile's model provider and process.Option 2: multi-repo mode
One runtime with a list of repositories. A Ticket records its repository; the Executor's
prepare,DSH_SUPERAGENT_GITHUB_REPOSITORY, branch naming, commit identity, and PR binding follow the Ticket's repository. Thread keys becomegithub:<owner>/<name>:<number>, and Policy/admission can be scoped per repository. The main Session routes by repository.This is the better product fit for the underlying use case, but it is a larger change than instance namespacing.
Option 3: companion-profile support
If multiple processes remain the intended model:
profile clone/settings export-import that copies Sources, Policy, prompts, and executor configuration without secrets;SuperagentandSuperagent2.Reproduction sketch
The second entry cannot run as an independent instance: service registration, routes, panel IDs, agent presets, and health names conflict with the first. A second profile avoids the conflict but requires a new port/state and a full settings copy.
Environment
0.2.1-rc.5dsh-superagent0.1.0(prototype, commit6337fc8)22.22, LinuxThe prototype repository has issues disabled, so I am posting this in the parent project's Ideas category. If there is a better tracker for
dsh-superagentfeedback, please point me there.中文摘要: 当前一个 DSH profile 只能跑一个 SuperAgent。第二个仓库要新建 profile、端口、
stateDir,并把 GitHub、Policy、Prompts、Executor、Feishu 全部重配一遍;现有 3082 的左侧也看不到第二个实例。希望支持同 profile 多实例(用instanceId做服务/路由/面板/preset/health 命名空间),或一个运行时多仓库;至少提供配置克隆/导入,减少重复初始化。All reactions