Skip to content
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

feat: add CLI support for Agent Hub #82

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

feat: add CLI support for Agent Hub #82

wants to merge 26 commits into from

Conversation

matewolf
Copy link
Collaborator

@matewolf matewolf commented Apr 2, 2025

No description provided.

@matewolf matewolf force-pushed the hub-cli branch 2 times, most recently from 6247ab4 to 8b99231 Compare April 3, 2025 14:18
@paralta paralta changed the title Add CLI support for Agent Hub feat: add CLI support for Agent Hub Apr 3, 2025
@matewolf matewolf force-pushed the hub-cli branch 2 times, most recently from be296f0 to fcd0ecd Compare April 3, 2025 14:43
@paralta
Copy link
Member

paralta commented Apr 3, 2025

@matewolf As discussed, I think we could improve the PR with the following suggestions:

  • Keep all API code under the /api folder by moving /hub/api to /api/hub/
  • Review if the proto messages that already exist in api/core can be reused by the hub like Locator, Category (category has been deprecated in favour of Skill) and Agent
  • Keep options for each command inside the corresponding command folder

matewolf and others added 22 commits April 4, 2025 18:13
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: Zsolt Rappi <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
Signed-off-by: matewolf <[email protected]>
@matewolf matewolf marked this pull request as ready for review April 4, 2025 16:23
@matewolf matewolf requested a review from a team as a code owner April 4, 2025 16:23
Comment on lines +21 to +27
plugins:
- remote: buf.build/grpc/go:v1.5.1
out: .
opt: paths=source_relative
- remote: buf.build/protocolbuffers/go:v1.36.5
out: .
opt: paths=source_relative
Copy link
Member

Choose a reason for hiding this comment

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

here you are using the same plugins that we use for the core/store/routing APIs, so we could generate hub code with the same api/buf.gen.yaml file. this would also avoid simplify the changes in Taskfile.yml

Copy link
Collaborator Author

@matewolf matewolf Apr 7, 2025

Choose a reason for hiding this comment

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

I wouldn't like to use the same buf file and integrate deps:api:gen task because running this task would need a permission to reach the private hub repo. Maybe it is possible to exclude some module from buf generate command.

@@ -39,6 +39,8 @@ vars:
GOLANGCI_LINT_BIN: '{{ .BIN_DIR }}/golangci-lint-{{.GOLANGCI_LINT_VERSION}}'
LICENSEI_VERSION: '0.9.0'
LICENSEI_BIN: '{{ .BIN_DIR }}/licensei-{{.LICENSEI_VERSION}}'
HUB_API_VERSION: 'main'
HUB_REPO_URL: 'https://github.com/cisco-eti/phoenix-saas-be.git'
Copy link
Member

@paralta paralta Apr 7, 2025

Choose a reason for hiding this comment

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

should we keep this reference to an internal repo in the open repo? the git clone below will fail for users without access

unpublish.Command,
publish.NewCommand(baseOption),
list.NewCommand(baseOption),
unpublish.NewCommand(baseOption),
network.Command,
Copy link
Member

Choose a reason for hiding this comment

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

this new command needs to be refactored as well

@@ -17,7 +16,6 @@ func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGHUP, syscall.SIGTERM)

if err := cmd.Run(ctx); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

was this print removed by mistake?

This command handles the build process for agent data models
from source code. It generates a JSON object that
describes an agent and satisfies the **Open Agent Schema Framework** specification.
Usage examples:
1. When build config is present under the agent source code:
Copy link
Member

Choose a reason for hiding this comment

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

let's keep the formatting here, since the same numbered formatting is used in the push and pull commands

Comment on lines +28 to +36
# List summary about our published data.
dir list info
2. List summary about published data across the network:
# List summary about published data by a specific peer.
dir list info --peer <peer-id>
# List summary about published data by the whole network.
# NOTE: This starts a DHT walk, so it may take a while.
# NOTE: Results are not guaranteed to be complete and up-to-date.
Copy link
Member

Choose a reason for hiding this comment

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

there might have been a merge conflict issue here, please check

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.

3 participants