devin-cli 1.2.3__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {devin_cli-1.2.3 → devin_cli-1.2.4}/PKG-INFO +1 -1
- {devin_cli-1.2.3 → devin_cli-1.2.4}/pyproject.toml +1 -1
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/knowledge.py +8 -6
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/knowledge.py +16 -5
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/sessions.py +2 -1
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/cli.py +13 -4
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_knowledge.py +5 -3
- {devin_cli-1.2.3 → devin_cli-1.2.4}/.github/workflows/pypi-publish.yml +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/.gitignore +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/CHANGELOG.md +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/LICENSE +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/README.md +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/assets/logo.png +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/generate_facades.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/setup.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/__init__.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/__init__.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/attachments.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/client.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/consumption.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/knowledge.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/members.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/organizations.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/playbooks.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/repositories.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/schedules.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/secrets.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/sessions.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/__init__.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/attachments.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/playbooks.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/secrets.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v1/sessions.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/__init__.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/attachments.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/consumption.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/members.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/organizations.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/playbooks.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/repositories.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/schedules.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/api/v3/secrets.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/src/devin_cli/config.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/__init__.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/conftest.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_attachments.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_playbooks.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_repositories.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_schedules.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_secrets.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_api/test_sessions.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_cli.py +0 -0
- {devin_cli-1.2.3 → devin_cli-1.2.4}/tests/test_config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devin-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Unofficial CLI for Devin AI - The first AI Software Engineer
|
|
5
5
|
Project-URL: Homepage, https://github.com/revanthpobala/devin-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/revanthpobala/devin-cli.git
|
|
@@ -5,18 +5,19 @@ def list_knowledge():
|
|
|
5
5
|
return client.get("knowledge")
|
|
6
6
|
|
|
7
7
|
def create_knowledge(
|
|
8
|
-
name: str,
|
|
9
|
-
body: str,
|
|
10
|
-
trigger_description: str,
|
|
8
|
+
name: str = None,
|
|
9
|
+
body: str = None,
|
|
10
|
+
trigger_description: str = None,
|
|
11
11
|
parent_folder_id: str = None,
|
|
12
12
|
pinned_repo: str = None,
|
|
13
13
|
title: str = None, # v3 fallback
|
|
14
|
+
trigger: str = None, # v3 fallback
|
|
14
15
|
**kwargs
|
|
15
16
|
):
|
|
16
17
|
data = {
|
|
17
18
|
"name": name or title,
|
|
18
19
|
"body": body,
|
|
19
|
-
"trigger_description": trigger_description or ""
|
|
20
|
+
"trigger_description": trigger_description or trigger or ""
|
|
20
21
|
}
|
|
21
22
|
if parent_folder_id:
|
|
22
23
|
data["parent_folder_id"] = parent_folder_id
|
|
@@ -31,6 +32,7 @@ def update_knowledge(
|
|
|
31
32
|
body: str = None,
|
|
32
33
|
trigger_description: str = None,
|
|
33
34
|
title: str = None, # v3 fallback
|
|
35
|
+
trigger: str = None, # v3 fallback
|
|
34
36
|
**kwargs
|
|
35
37
|
):
|
|
36
38
|
data = {}
|
|
@@ -38,8 +40,8 @@ def update_knowledge(
|
|
|
38
40
|
data["name"] = name or title
|
|
39
41
|
if body:
|
|
40
42
|
data["body"] = body
|
|
41
|
-
if trigger_description:
|
|
42
|
-
data["trigger_description"] = trigger_description
|
|
43
|
+
if trigger_description or trigger:
|
|
44
|
+
data["trigger_description"] = trigger_description or trigger
|
|
43
45
|
|
|
44
46
|
return client.put(f"knowledge/{knowledge_id}", json=data)
|
|
45
47
|
|
|
@@ -5,12 +5,17 @@ def list_knowledge():
|
|
|
5
5
|
return client.get("knowledge/notes")
|
|
6
6
|
|
|
7
7
|
def create_knowledge(
|
|
8
|
-
title: str,
|
|
9
|
-
body: str,
|
|
8
|
+
title: str = None,
|
|
9
|
+
body: str = None,
|
|
10
|
+
name: str = None,
|
|
11
|
+
trigger: str = "",
|
|
12
|
+
trigger_description: str = "",
|
|
13
|
+
**kwargs
|
|
10
14
|
):
|
|
11
15
|
data = {
|
|
12
|
-
"
|
|
16
|
+
"name": name or title,
|
|
13
17
|
"body": body,
|
|
18
|
+
"trigger": trigger or trigger_description or ""
|
|
14
19
|
}
|
|
15
20
|
return client.post("knowledge/notes", json=data)
|
|
16
21
|
|
|
@@ -21,12 +26,18 @@ def update_knowledge(
|
|
|
21
26
|
note_id: str,
|
|
22
27
|
title: Optional[str] = None,
|
|
23
28
|
body: Optional[str] = None,
|
|
29
|
+
trigger: Optional[str] = None,
|
|
30
|
+
name: Optional[str] = None,
|
|
31
|
+
trigger_description: Optional[str] = None,
|
|
32
|
+
**kwargs
|
|
24
33
|
):
|
|
25
34
|
data = {}
|
|
26
|
-
if title:
|
|
27
|
-
data["
|
|
35
|
+
if title or name:
|
|
36
|
+
data["name"] = title or name
|
|
28
37
|
if body:
|
|
29
38
|
data["body"] = body
|
|
39
|
+
if trigger or trigger_description:
|
|
40
|
+
data["trigger"] = trigger or trigger_description
|
|
30
41
|
|
|
31
42
|
return client.put(f"knowledge/notes/{note_id}", json=data)
|
|
32
43
|
|
|
@@ -27,8 +27,9 @@ def create_session(
|
|
|
27
27
|
):
|
|
28
28
|
data = {
|
|
29
29
|
"prompt": prompt,
|
|
30
|
-
"bypass_approval": bypass_approval,
|
|
31
30
|
}
|
|
31
|
+
if bypass_approval:
|
|
32
|
+
data["bypass_approval"] = bypass_approval
|
|
32
33
|
if advanced_mode:
|
|
33
34
|
data["advanced_mode"] = advanced_mode
|
|
34
35
|
if attachment_urls:
|
|
@@ -413,11 +413,12 @@ def list_knowledge_cmd(org: Optional[str] = typer.Option(None, "--org")):
|
|
|
413
413
|
def create_knowledge_cmd(
|
|
414
414
|
title: str,
|
|
415
415
|
body: str,
|
|
416
|
+
trigger: str = typer.Option("", "--trigger", help="Trigger description"),
|
|
416
417
|
org: Optional[str] = typer.Option(None, "--org"),
|
|
417
418
|
):
|
|
418
419
|
"""Create a knowledge note."""
|
|
419
420
|
if org: config.temporary_org_id = org
|
|
420
|
-
resp = knowledge.create_knowledge(title, body)
|
|
421
|
+
resp = knowledge.create_knowledge(title=title, body=body, trigger=trigger)
|
|
421
422
|
console.print(f"[green]Created note:[/green] {resp.get('id')}")
|
|
422
423
|
|
|
423
424
|
@knowledge_app.command("delete")
|
|
@@ -435,13 +436,21 @@ def delete_knowledge_cmd(
|
|
|
435
436
|
# --- Playbooks ---
|
|
436
437
|
@playbook_app.command("list")
|
|
437
438
|
@handle_api_error
|
|
438
|
-
def list_playbooks_cmd(
|
|
439
|
+
def list_playbooks_cmd(
|
|
440
|
+
org: Optional[str] = typer.Option(None, "--org"),
|
|
441
|
+
json_output: bool = typer.Option(False, "--json", help="Output raw JSON"),
|
|
442
|
+
):
|
|
439
443
|
"""List team playbooks."""
|
|
440
444
|
if org: config.temporary_org_id = org
|
|
441
445
|
resp = playbooks.list_playbooks()
|
|
442
446
|
items = resp.get("items", []) if isinstance(resp, dict) else resp
|
|
447
|
+
|
|
448
|
+
if json_output:
|
|
449
|
+
console.print(json.dumps(items, indent=2))
|
|
450
|
+
return
|
|
451
|
+
|
|
443
452
|
table = Table(title="Playbooks")
|
|
444
|
-
table.add_column("ID", style="cyan")
|
|
453
|
+
table.add_column("ID", style="cyan", no_wrap=True)
|
|
445
454
|
table.add_column("Title")
|
|
446
455
|
for item in items:
|
|
447
456
|
if isinstance(item, dict):
|
|
@@ -950,7 +959,7 @@ def update_knowledge_cmd(
|
|
|
950
959
|
trigger: Optional[str] = typer.Option(None, "--trigger"),
|
|
951
960
|
):
|
|
952
961
|
"""Update an existing knowledge entry."""
|
|
953
|
-
knowledge.update_knowledge(knowledge_id, title=name, body=body)
|
|
962
|
+
knowledge.update_knowledge(knowledge_id, title=name, body=body, trigger=trigger)
|
|
954
963
|
console.print(f"[green]Knowledge {knowledge_id} updated.[/green]")
|
|
955
964
|
|
|
956
965
|
@app.command("update-playbook")
|
|
@@ -24,19 +24,21 @@ def test_create_knowledge():
|
|
|
24
24
|
)
|
|
25
25
|
knowledge.create_knowledge(
|
|
26
26
|
title="test",
|
|
27
|
-
body="content"
|
|
27
|
+
body="content",
|
|
28
|
+
trigger="my_trigger"
|
|
28
29
|
)
|
|
29
30
|
assert route.called
|
|
30
31
|
import json
|
|
31
32
|
body = json.loads(route.calls.last.request.read())
|
|
32
|
-
assert body["
|
|
33
|
+
assert body["name"] == "test"
|
|
34
|
+
assert body["trigger"] == "my_trigger"
|
|
33
35
|
|
|
34
36
|
@respx.mock
|
|
35
37
|
def test_update_knowledge():
|
|
36
38
|
route = respx.put("https://api.devin.ai/v3/organizations/test_org/knowledge/notes/k_123").mock(
|
|
37
39
|
return_value=Response(200)
|
|
38
40
|
)
|
|
39
|
-
knowledge.update_knowledge("k_123", title="new")
|
|
41
|
+
knowledge.update_knowledge("k_123", title="new", trigger="new_trigger")
|
|
40
42
|
assert route.called
|
|
41
43
|
|
|
42
44
|
@respx.mock
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|