devops-bot-sdk 1.4.14__tar.gz → 1.4.17__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.
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/PKG-INFO +1 -1
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/PKG-INFO +1 -1
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/pyproject.toml +1 -1
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/__init__.py +2 -2
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/client.py +1 -1
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/ipc/handlers.py +35 -15
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/local_exec.py +17 -1
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/README.md +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/SOURCES.txt +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/dependency_links.txt +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/entry_points.txt +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/requires.txt +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/top_level.txt +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/collectors/__init__.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/collectors/files.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/collectors/process.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/collectors/screenshot.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/config.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/crucial.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/exceptions.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/git_ops.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/graphify.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/hooks/__init__.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/hooks/crucial_guard.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/ipc/__init__.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/ipc/electron_bridge.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/models/__init__.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/models/envelope.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/models/requests.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/models/responses.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/models/snapshots.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/py.typed +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/run_auto.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/sse.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/test.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/test_pipeline.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/sdk/updater.py +0 -0
- {devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/setup.cfg +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "devops-bot-sdk"
|
|
7
|
-
version = "1.4.
|
|
7
|
+
version = "1.4.17"
|
|
8
8
|
description = "DevOps Bot Desktop SDK — thin client for the AgentOS Electron desktop app"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LicenseRef-Proprietary"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""AgentOS Desktop SDK — thin HTTPS/SSE client for the Electron app.
|
|
2
2
|
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.17
|
|
4
4
|
|
|
5
5
|
Public surface:
|
|
6
6
|
BackendClient.from_config() — create client from ~/.agentos/config.toml
|
|
@@ -30,7 +30,7 @@ Rules:
|
|
|
30
30
|
- All data egress through submit_webhook only
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
|
-
__version__ = "1.4.
|
|
33
|
+
__version__ = "1.4.17"
|
|
34
34
|
__author__ = "AgentOS"
|
|
35
35
|
|
|
36
36
|
from sdk.client import BackendClient
|
|
@@ -36,7 +36,7 @@ from sdk.sse import _check_status, stream_with_reconnect
|
|
|
36
36
|
|
|
37
37
|
logger = logging.getLogger(__name__)
|
|
38
38
|
|
|
39
|
-
SDK_VERSION = "1.4.
|
|
39
|
+
SDK_VERSION = "1.4.17"
|
|
40
40
|
_POLL_INTERVAL = 3.0
|
|
41
41
|
_POLL_TIMEOUT = 600.0
|
|
42
42
|
_ORCHESTRATE_TIMEOUT = 2700.0 # 45 min — covers approval wait + VPS execution time
|
|
@@ -149,6 +149,7 @@ def _build_local_prompt(
|
|
|
149
149
|
structured_plan: dict | None,
|
|
150
150
|
human_instructions: str | None = None,
|
|
151
151
|
agent_mode: bool = True,
|
|
152
|
+
git_managed: bool = True,
|
|
152
153
|
) -> str:
|
|
153
154
|
"""Compose the coding prompt for the local claude CLI from the server plan.
|
|
154
155
|
|
|
@@ -204,14 +205,29 @@ def _build_local_prompt(
|
|
|
204
205
|
"above are authoritative if anything conflicts) ===\n"
|
|
205
206
|
+ _clip_text(user_input.strip())
|
|
206
207
|
)
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
208
|
+
if git_managed:
|
|
209
|
+
# The target is a git repo the SDK manages — it branches before and
|
|
210
|
+
# commits/pushes/opens the PR after, so the agent must not touch git here.
|
|
211
|
+
parts.append(
|
|
212
|
+
"Complete all of the above in the current project directory. "
|
|
213
|
+
"Create and edit every file needed for a complete, working result.\n"
|
|
214
|
+
"Git for THIS repo is handled for you: a feature branch is already checked "
|
|
215
|
+
"out, and the system will commit, push, and open the PR after you finish — "
|
|
216
|
+
"so do NOT create branches, commit, push, or open a PR for the current repo. "
|
|
217
|
+
"(You may still clone and open PRs for OTHER repositories the instructions name.)"
|
|
218
|
+
)
|
|
219
|
+
else:
|
|
220
|
+
# Plain local working folder (no GitHub repo / not under our git control) —
|
|
221
|
+
# e.g. a non-developer (BA/analyst) task that just produces files/docs.
|
|
222
|
+
parts.append(
|
|
223
|
+
"Complete all of the above in the current working directory by creating and "
|
|
224
|
+
"editing the necessary files (documents, .md files, spreadsheets, code — "
|
|
225
|
+
"whatever the task asks for). This is a plain local folder, NOT a git "
|
|
226
|
+
"repository under our control: do NOT initialise git, create branches, "
|
|
227
|
+
"commit, push, or open a PR for it unless the instructions explicitly say so. "
|
|
228
|
+
"Just produce the requested deliverables here. (You may still clone and open "
|
|
229
|
+
"PRs for OTHER repositories the instructions explicitly name.)"
|
|
230
|
+
)
|
|
215
231
|
# agentMode=true → require approval before crucial/irreversible actions.
|
|
216
232
|
if agent_mode:
|
|
217
233
|
from sdk import crucial
|
|
@@ -399,7 +415,6 @@ async def _code_one_repo(
|
|
|
399
415
|
repo_path: str,
|
|
400
416
|
repo_url: str | None,
|
|
401
417
|
pending: dict,
|
|
402
|
-
prompt: str,
|
|
403
418
|
gh_token: str | None,
|
|
404
419
|
agent_mode: bool,
|
|
405
420
|
approval_dir: str | None,
|
|
@@ -474,6 +489,14 @@ async def _code_one_repo(
|
|
|
474
489
|
data={"status": "running", "current_step": f"Executing locally in {name} (claude_code)"},
|
|
475
490
|
).model_dump())
|
|
476
491
|
|
|
492
|
+
# Build the prompt with framing that matches the target: a git repo we manage
|
|
493
|
+
# (branch + PR) vs a plain local folder (BA/analyst deliverables, no git/PR).
|
|
494
|
+
prompt = _build_local_prompt(
|
|
495
|
+
pending["user_input"], pending.get("structured_plan"),
|
|
496
|
+
pending.get("human_instructions"),
|
|
497
|
+
agent_mode=agent_mode, git_managed=bool(branch_info),
|
|
498
|
+
)
|
|
499
|
+
|
|
477
500
|
# 3. initial claude run
|
|
478
501
|
result = await local_exec.run_claude_local(
|
|
479
502
|
prompt, repo_path, on_event=_on_event,
|
|
@@ -636,11 +659,8 @@ async def handle_pipeline_approve(
|
|
|
636
659
|
return
|
|
637
660
|
|
|
638
661
|
# ── Approved: run the local claude CLI on EACH repo the ticket names ──
|
|
639
|
-
prompt
|
|
640
|
-
|
|
641
|
-
pending.get("human_instructions"),
|
|
642
|
-
agent_mode=bool(pending.get("agent_mode", True)),
|
|
643
|
-
)
|
|
662
|
+
# The prompt is built per-repo inside _code_one_repo so its framing matches
|
|
663
|
+
# whether that target is a git repo (branch + PR) or a plain local folder.
|
|
644
664
|
agent_mode = bool(pending.get("agent_mode", True))
|
|
645
665
|
|
|
646
666
|
# Fetch the user's GitHub token from the backend so the local agent can
|
|
@@ -675,7 +695,7 @@ async def handle_pipeline_approve(
|
|
|
675
695
|
runs.append(await _code_one_repo(
|
|
676
696
|
client, repo_path=tgt["path"], repo_url=tgt.get("url"),
|
|
677
697
|
base=tgt.get("base"),
|
|
678
|
-
pending=pending,
|
|
698
|
+
pending=pending, gh_token=gh_token,
|
|
679
699
|
agent_mode=agent_mode, approval_dir=approval_dir,
|
|
680
700
|
send=send, thread_id=thread_id, task_id=task_id,
|
|
681
701
|
))
|
|
@@ -222,8 +222,12 @@ async def run_claude_local(
|
|
|
222
222
|
path.mkdir(parents=True, exist_ok=True)
|
|
223
223
|
|
|
224
224
|
tools = allowed_tools or DEFAULT_ALLOWED_TOOLS
|
|
225
|
+
# The prompt is fed via STDIN (not as an argv), so a long plan/instructions
|
|
226
|
+
# can't blow past the OS command-line limit — on Windows that's ~32 KB and
|
|
227
|
+
# raised "The command line is too long." `claude -p` reads the prompt from a
|
|
228
|
+
# piped stdin.
|
|
225
229
|
cmd = [
|
|
226
|
-
cli, "-p",
|
|
230
|
+
cli, "-p",
|
|
227
231
|
"--output-format", "stream-json",
|
|
228
232
|
"--verbose", # required for stream-json
|
|
229
233
|
"--permission-mode", "acceptEdits", # apply file edits without prompting
|
|
@@ -270,12 +274,24 @@ async def run_claude_local(
|
|
|
270
274
|
proc = await asyncio.create_subprocess_exec(
|
|
271
275
|
*cmd,
|
|
272
276
|
cwd=str(path),
|
|
277
|
+
stdin=asyncio.subprocess.PIPE,
|
|
273
278
|
stdout=asyncio.subprocess.PIPE,
|
|
274
279
|
stderr=asyncio.subprocess.PIPE,
|
|
275
280
|
env=env,
|
|
276
281
|
limit=_STREAM_LIMIT_BYTES,
|
|
277
282
|
)
|
|
278
283
|
|
|
284
|
+
# Feed the prompt via stdin (claude -p reads it), then close stdin so claude
|
|
285
|
+
# starts. Bounded write before draining stdout — no deadlock (claude buffers
|
|
286
|
+
# the prompt before emitting any events).
|
|
287
|
+
if proc.stdin is not None:
|
|
288
|
+
try:
|
|
289
|
+
proc.stdin.write((prompt or "").encode("utf-8"))
|
|
290
|
+
await proc.stdin.drain()
|
|
291
|
+
proc.stdin.close()
|
|
292
|
+
except Exception: # noqa: BLE001 — broken pipe if claude already exited
|
|
293
|
+
pass
|
|
294
|
+
|
|
279
295
|
result_event: dict | None = None
|
|
280
296
|
files_changed: list[str] = []
|
|
281
297
|
session_id: str | None = resume_session_id
|
|
File without changes
|
|
File without changes
|
{devops_bot_sdk-1.4.14 → devops_bot_sdk-1.4.17}/devops_bot_sdk.egg-info/dependency_links.txt
RENAMED
|
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
|