Skip to content

feat(hub): add remote registry store and default opencsg templates#77

Merged
RussellLuo merged 2 commits into
OpenCSGs:mainfrom
wanghaojie124:dev
May 19, 2026
Merged

feat(hub): add remote registry store and default opencsg templates#77
RussellLuo merged 2 commits into
OpenCSGs:mainfrom
wanghaojie124:dev

Conversation

@wanghaojie124
Copy link
Copy Markdown
Collaborator

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.

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.
Comment thread internal/config/config.go Outdated
}

out := make([]HubRegistryConfig, 0, len(c.Registries))
user := make([]HubRegistryConfig, 0, len(c.Registries))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user reads a bit too user-facing here. configured seems more accurate for values coming from config.

Comment thread internal/config/config.go Outdated
}

func mergeHubRegistries(defaults, user []HubRegistryConfig) []HubRegistryConfig {
byName := make(map[string]HubRegistryConfig, len(user))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this map is built from configured registries, configuredByName may be clearer than byName.

Comment thread internal/config/config.go Outdated
BoxLiteProvider = "boxlite"
DefaultHubRegistry = "builtin"
DefaultHubPublishRegistry = "local"
DefaultOfficialHubRegistryName = "opencsg"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@RussellLuo RussellLuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@RussellLuo RussellLuo merged commit eab7dd6 into OpenCSGs:main May 19, 2026
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.

2 participants