-
Notifications
You must be signed in to change notification settings - Fork 85
Add Zhizhangyi MBS service adapter #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bafc167
Add Zhizhangyi MBS service adapter
tongzhouli d609af4
Address Zhizhangyi MBS review findings
tongzhouli a0372a5
Fix supervisor secret cleanup on stop timeout
tongzhouli 72a5ae7
Validate MBS user state inputs
tongzhouli 77568f0
Address MBS review input handling
tongzhouli a671968
Clarify MBS encrypted password handling
tongzhouli 6e4a1d8
Validate MBS update user department
tongzhouli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| import { runServiceMain } from "@chaitin-ai/octobus-sdk"; | ||
|
|
||
| import { service } from "../src/service.js"; | ||
|
|
||
| runServiceMain(service); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "additionalProperties": true, | ||
| "properties": { | ||
| "endpoint": { | ||
| "type": "string", | ||
| "description": "MBS REST API base URL. Example: https://mbs.example.com:9074" | ||
| }, | ||
| "baseUrl": { | ||
| "type": "string", | ||
| "description": "Legacy alias for endpoint." | ||
| }, | ||
| "skipTlsVerify": { | ||
| "type": "boolean", | ||
| "default": false, | ||
| "description": "Skip TLS certificate verification. Enable only when the target MBS endpoint uses a trusted self-signed certificate." | ||
| }, | ||
| "timeoutMs": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "default": 30000, | ||
| "description": "HTTP timeout in milliseconds." | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "zhizhangyi-mbs", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "type": "module", | ||
| "files": [ | ||
| "bin/zhizhangyi-mbs.js", | ||
| "config.schema.json", | ||
| "secret.schema.json", | ||
| "service.json", | ||
| "proto", | ||
| "src" | ||
| ], | ||
| "bin": { | ||
| "zhizhangyi-mbs": "bin/zhizhangyi-mbs.js" | ||
| }, | ||
| "dependencies": { | ||
| "@chaitin-ai/octobus-sdk": "^0.5.0" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtimeSecretArg 在两个 Go 包中定义了相同的未使用参数 workdir
internal/supervisor/supervisor.go与internal/protocol/gateway.go中均新增了runtimeSecretArg(workdir string, secret []byte)函数,但函数体内完全没有使用workdir形参。该参数在当前实现中为死代码,增加了调用方的困惑,也暗示可能存在未完成的重构(例如计划将 secret 写入 workdir 下的临时文件,而非继续使用 memfd/pipe)。Problem code:
Recommendation:
若短期内不需要基于 workdir 的 secret 文件策略,建议先从函数签名中移除
workdir参数,保持接口简洁;若这是为后续功能预留的,应添加 TODO 注释说明,避免维护者困惑。也可以考虑将runtimeSecretArg提取到公共包中,消除 supervisor 与 gateway 之间的代码重复。