feat(catalog): sin-code catalog CLI + Source interface (issue #163, hub-assets merge)#208
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown)
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown) Run ID:
|
…ub-assets merge)
What ships:
- cmd/sin-code/catalog_cmd.go — new subcommand 'sin-code catalog'
(list | search | info) with --kind and --format flags
- cmd/sin-code/internal/catalog/ — 4 source files + 21 race-clean tests
- catalog.go: Asset, Kind, Source, Merge, Search, FilterByKind
- source_hub.go: HubSource adapter (wraps internal/hub)
- source_assets.go: AssetsSource adapter (wraps *assets.Registry)
- catalog_test.go: 21 tests covering merge dedup, search ranking,
filter, both source adapters, end-to-end
- main.go registration (additive, no breaking change)
De-duplication rule:
- Key is (kind, name), NOT (source, kind, name)
- A hub.Tool and an assets.Asset with the same (kind, name) merge
into one catalog entry; the first source wins
- This is the SOTA choice: operators think 'do I have a tool for
this?', not 'which backend has it?'
Search ranking:
- name +4, short +2, description +1, tag +1
- Ties break by name ascending
- Score is auditable in source; not exposed in CLI output
Deprecation:
- sin-code hub continues to work unchanged
- Issue body: 'sin hub and sin assets remain as deprecated aliases
of sin catalog for one minor release. After v3.20, they go.'
- The actual deprecation warning is a follow-up that patches
hub_cmd.go — out of scope here
Hard mandates honored:
- M2: stdlib + existing internal/{hub,assets} packages, no new deps
- M5: module path unchanged
- M6: Source interface is the SIN-tool abstraction; both adapters
reuse the existing hub.FormatList / assets.Registry without
copying any logic
- M7: 21/21 tests pass under go test -race -count=1
Known issue (NOT in this PR):
- 'go build ./cmd/sin-code/...' is currently broken on v3.18.0
main because the merged pkg/browser/cdp/ (PR #201) shipped
without a complete go.sum and a Chromedp API mismatch. This
PR does not touch Browser/CDP. The catalog package itself is
build-clean and tested.
Refs: #163
Delqhi
force-pushed
the
feat/issue-163-catalog
branch
from
June 16, 2026 17:58
321dc1e to
ce87123
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements the third of the 5 issues. Scope-bounded to the catalog package + CLI + Source interface. Per-test fixups and the actual deprecation warning for
sin-code hubare follow-ups (out of scope here).What ships
cmd/sin-code/catalog_cmd.go— new subcommandsin-code catalog(list | search | info) with--kind=agent|command|skill|huband--format=text|jsoncmd/sin-code/internal/catalog/— 4 source files + 21 race-clean testscatalog.go— Asset, Kind, Source, Merge, Search, FilterByKindsource_hub.go— HubSource adapter (wrapsinternal/hub)source_assets.go— AssetsSource adapter (wraps*assets.Registry)catalog_test.go— 21 tests covering merge dedup, search ranking, filter, both source adapters, end-to-endmain.goregistration (additive, no breaking change)De-duplication rule
(kind, name), NOT(source, kind, name)hub.Tooland anassets.Assetwith the same(kind, name)merge into one catalog entry; the first source winsSearch ranking
Deprecation
sin-code hubcontinues to work unchangedhub_cmd.go— out of scope hereHard mandates honored
internal/{hub,assets}packages, no new depshub.FormatList/assets.Registrywithout copying any logicgo test -race -count=1Known issue (NOT in this PR)
go build ./cmd/sin-code/...is currently broken on v3.18.0 main because the mergedpkg/browser/cdp/(PR #201) shipped without a completego.sumand a Chromedp API mismatch. This PR does not touch Browser/CDP. The catalog package itself is build-clean and tested.Diffstat
Closes