-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from agentsea/dev
fix owner bug
- Loading branch information
Showing
9 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "surfkit" | ||
version = "0.1.196" | ||
version = "0.1.199" | ||
description = "A toolkit for building AI agents that use devices" | ||
authors = ["Patrick Barker <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -21,7 +21,7 @@ litellm = "^1.35.8" | |
tiktoken = "^0.6.0" | ||
rich = "^13.7.1" | ||
agentdesk = "^0.2.84" | ||
taskara = "^0.1.99" | ||
taskara = "^0.1.100" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
|
This file contains 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 |
---|---|---|
|
@@ -60,9 +60,14 @@ def version(): | |
|
||
|
||
# Root command callback | ||
@app.callback(invoke_without_command=True) | ||
def default(ctx: typer.Context): | ||
show_help(ctx, "root") | ||
def default( | ||
ctx: typer.Context, | ||
debug: bool = typer.Option(False, "--debug", "-d", help="Enable debug mode"), | ||
): | ||
if debug: | ||
logger.setLevel(logging.DEBUG) | ||
else: | ||
logger.setLevel(logging.INFO) | ||
|
||
|
||
# 'create' command group callback | ||
|
@@ -1439,6 +1444,7 @@ def solve( | |
from taskara import Task | ||
from taskara.runtime.base import Tracker | ||
|
||
from surfkit.config import HUB_API_URL, GlobalConfig | ||
from surfkit.server.models import V1SolveTask | ||
from surfkit.types import AgentType | ||
from surfkit.util import find_open_port | ||
|
@@ -1624,8 +1630,6 @@ def solve( | |
if agent_type: | ||
from typing import List | ||
|
||
from surfkit.config import HUB_API_URL, GlobalConfig | ||
|
||
all_types: List[AgentType] = [] | ||
|
||
type_parts = agent_type.split("/") | ||
|
@@ -1714,6 +1718,15 @@ def solve( | |
if starting_url: | ||
params["site"] = starting_url | ||
|
||
owner = "[email protected]" | ||
config = GlobalConfig.read() | ||
if config.api_key: | ||
from surfkit.hub import Hub | ||
|
||
hub = Hub() | ||
user_info = hub.get_user_info(config.api_key) | ||
owner = user_info.email | ||
|
||
task = Task( | ||
description=description, | ||
parameters=params, | ||
|
@@ -1722,6 +1735,7 @@ def solve( | |
assigned_to=agent, | ||
assigned_type=agent_type, | ||
remote=_remote_task_svr, | ||
owner_id=owner, | ||
) | ||
|
||
if _device and view: | ||
|
This file contains 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 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 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 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 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 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