feat(hub): add remote registry store and default opencsg templates#77
Conversation
Enable listing and fetching templates from remote hub registries (e.g. csgclaw.opencsg.com), merge builtin/local/opencsg defaults into hub config, tolerate partial registry list failures with warnings, and cap remote JSON responses. Update serve, API workspace handling, and agent-related tests.
| } | ||
|
|
||
| out := make([]HubRegistryConfig, 0, len(c.Registries)) | ||
| user := make([]HubRegistryConfig, 0, len(c.Registries)) |
There was a problem hiding this comment.
user reads a bit too user-facing here. configured seems more accurate for values coming from config.
| } | ||
|
|
||
| func mergeHubRegistries(defaults, user []HubRegistryConfig) []HubRegistryConfig { | ||
| byName := make(map[string]HubRegistryConfig, len(user)) |
There was a problem hiding this comment.
Since this map is built from configured registries, configuredByName may be clearer than byName.
| BoxLiteProvider = "boxlite" | ||
| DefaultHubRegistry = "builtin" | ||
| DefaultHubPublishRegistry = "local" | ||
| DefaultOfficialHubRegistryName = "opencsg" |
There was a problem hiding this comment.
Would official be a better default registry name here than opencsg? The URL can still point to https://csgclaw.opencsg.com, while the registry name stays role-based and UI-friendly.
RussellLuo
left a comment
There was a problem hiding this comment.
If we rename the default remote registry to official, the Web UI should also localize that source tag. Please update web/static/app.js, especially localizeTemplateSourceTag, so it shows official in English and 官方 in Chinese.
Rename the default remote hub registry from opencsg to official while keeping the opencsg.com URL. Clarify mergeHubRegistries naming (configured, configuredByName) and localize the official source tag in the web UI.
Enable listing and fetching templates from remote hub registries (e.g. csgclaw.opencsg.com), merge builtin/local/opencsg defaults into hub config, tolerate partial registry list failures with warnings, and cap remote JSON responses. Update serve, API workspace handling, and agent-related tests.