bamboo-coding 0.2.0__tar.gz → 0.2.2__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.
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/PKG-INFO +3 -3
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/pyproject.toml +3 -3
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/config.py +5 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/controller_client.py +8 -1
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/main.py +13 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/protocol.py +3 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/status.py +5 -1
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/PKG-INFO +3 -3
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/requires.txt +1 -1
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/README.md +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/setup.cfg +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/__init__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/__init__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/builtin_skills/__init__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/builtin_skills/skill-create/SKILL.md +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/builtin_skills/skill-optimize/SKILL.md +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/compose.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/defs.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/detection.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/runner.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/runtime.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/sessions.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/skills.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/skills_install.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/store.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/streams.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/tasks.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/types.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/capabilities/__init__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/capabilities/repo.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/__init__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/__main__.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/adapter.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/pty_session.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/pty_session_unix.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/pty_session_win.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/runtime.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/session.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/types.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/chat/virtual_screen.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/git_utils.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/journal.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/scrollback_buffer.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/terminal_runtime.py +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/SOURCES.txt +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/dependency_links.txt +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/entry_points.txt +0 -0
- {bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding.egg-info/top_level.txt +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bamboo-coding
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Bamboo Coding outbound client
|
|
5
5
|
Classifier: Operating System :: POSIX :: Linux
|
|
6
6
|
Classifier: Operating System :: Microsoft :: Windows
|
|
7
7
|
Classifier: Operating System :: MacOS
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
Requires-Dist: gitpython==3.1.40
|
|
11
11
|
Requires-Dist: websockets==13.1
|
|
12
12
|
Requires-Dist: pydantic>=2.0
|
|
13
|
-
Requires-Dist: bamboo-ssh>=0.2.
|
|
13
|
+
Requires-Dist: bamboo-ssh>=0.2.1
|
|
14
14
|
Requires-Dist: pyte>=0.8.2
|
|
15
15
|
Requires-Dist: psutil>=5.9
|
|
16
16
|
Requires-Dist: pywinpty>=2.0; sys_platform == "win32"
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bamboo-coding"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Bamboo Coding outbound client"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
11
|
classifiers = [
|
|
12
12
|
"Operating System :: POSIX :: Linux",
|
|
13
13
|
"Operating System :: Microsoft :: Windows",
|
|
@@ -17,7 +17,7 @@ dependencies = [
|
|
|
17
17
|
"gitpython==3.1.40",
|
|
18
18
|
"websockets==13.1",
|
|
19
19
|
"pydantic>=2.0",
|
|
20
|
-
"bamboo-ssh>=0.2.
|
|
20
|
+
"bamboo-ssh>=0.2.1",
|
|
21
21
|
"pyte>=0.8.2",
|
|
22
22
|
"psutil>=5.9",
|
|
23
23
|
"pywinpty>=2.0; sys_platform == 'win32'",
|
|
@@ -34,6 +34,9 @@ class AgentConfig:
|
|
|
34
34
|
token_path: Path
|
|
35
35
|
journal_path: Path
|
|
36
36
|
config_path: Path = field(default_factory=Path)
|
|
37
|
+
# Server-side login account that owns this client. Empty string = public:
|
|
38
|
+
# every logged-in user sees (and may approve) the pending registration.
|
|
39
|
+
user: str = ""
|
|
37
40
|
profile: str = DEFAULT_PROFILE
|
|
38
41
|
profile_exists: bool = True
|
|
39
42
|
legacy_client_section: bool = False
|
|
@@ -208,6 +211,7 @@ def load_config(profile: str | None = None) -> AgentConfig:
|
|
|
208
211
|
hostname = _first_env("BAMBOO_CODING_HOSTNAME", "AGENT_HOSTNAME") or str(
|
|
209
212
|
section.get("hostname") or platform.node() or client_id
|
|
210
213
|
)
|
|
214
|
+
user = _first_env("BAMBOO_CODING_USER") or str(section.get("user") or "")
|
|
211
215
|
version = _first_env("BAMBOO_CODING_VERSION", "AGENT_VERSION") or str(section.get("version") or _default_version())
|
|
212
216
|
allowed_roots = _coerce_allowed_roots(
|
|
213
217
|
_first_env("BAMBOO_CODING_ALLOWED_ROOTS", "AGENT_ALLOWED_ROOTS", "AGENT_ROOT", "AGENT_REPO_PATH")
|
|
@@ -259,6 +263,7 @@ def load_config(profile: str | None = None) -> AgentConfig:
|
|
|
259
263
|
controller_url=controller_url,
|
|
260
264
|
client_id=client_id,
|
|
261
265
|
hostname=hostname,
|
|
266
|
+
user=user,
|
|
262
267
|
version=version,
|
|
263
268
|
token=token,
|
|
264
269
|
token_path=token_path,
|
|
@@ -74,7 +74,14 @@ class ControllerConnection:
|
|
|
74
74
|
return self.websocket
|
|
75
75
|
|
|
76
76
|
async def send_register(self, message: AgentRegisterMessage) -> dict:
|
|
77
|
-
|
|
77
|
+
payload = message.model_dump()
|
|
78
|
+
# Old servers forbid unknown keys (extra: "forbid") and model_dump()
|
|
79
|
+
# emits every field, including None defaults; only send owner_user
|
|
80
|
+
# when it is actually set, so a new client with no owner keeps
|
|
81
|
+
# working against an old server.
|
|
82
|
+
if payload.get("owner_user") is None:
|
|
83
|
+
payload.pop("owner_user", None)
|
|
84
|
+
await self._send(payload)
|
|
78
85
|
return await self._receive()
|
|
79
86
|
|
|
80
87
|
async def send_status(self, message: ClientStatusMessage) -> bool:
|
|
@@ -232,6 +232,7 @@ class AgentRuntime:
|
|
|
232
232
|
queued_tasks=queued,
|
|
233
233
|
max_concurrent_tasks=max_concurrent,
|
|
234
234
|
connected=True,
|
|
235
|
+
owner_user=self.config.user or None,
|
|
235
236
|
)
|
|
236
237
|
registration = await self.connection.send_register(register)
|
|
237
238
|
self.last_registration_message = str(registration.get("message") or "")
|
|
@@ -684,6 +685,11 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
684
685
|
setup_parser.add_argument("--root", action="append", dest="roots", help="Allowed root path; pass more than once for multiple roots")
|
|
685
686
|
setup_parser.add_argument("--client-id", help="Client identifier advertised to the controller")
|
|
686
687
|
setup_parser.add_argument("--hostname", help="Hostname advertised to the controller")
|
|
688
|
+
setup_parser.add_argument(
|
|
689
|
+
"--user",
|
|
690
|
+
help="Server login account that owns this client; only that user sees "
|
|
691
|
+
"and approves it. Blank = every user.",
|
|
692
|
+
)
|
|
687
693
|
setup_parser.add_argument("--force", action="store_true", help="Overwrite the profile if it already exists")
|
|
688
694
|
|
|
689
695
|
run_parser = subparsers.add_parser("run", help="Run the Bamboo Coding client")
|
|
@@ -790,6 +796,7 @@ def setup_command(args: argparse.Namespace) -> int:
|
|
|
790
796
|
]
|
|
791
797
|
default_client_id = args.client_id or config.client_id
|
|
792
798
|
default_controller_url = args.controller_url or config.controller_url
|
|
799
|
+
default_user = args.user if args.user is not None else config.user
|
|
793
800
|
|
|
794
801
|
if interactive:
|
|
795
802
|
if profile_in_new_layout:
|
|
@@ -805,6 +812,7 @@ def setup_command(args: argparse.Namespace) -> int:
|
|
|
805
812
|
client_id = _prompt("Client ID", default_client_id)
|
|
806
813
|
default_hostname = args.hostname or config.hostname or client_id
|
|
807
814
|
hostname = _prompt("Hostname", default_hostname)
|
|
815
|
+
owner_user = _prompt("Owner user (optional, blank = everyone)", default_user)
|
|
808
816
|
allowed_roots = _prompt_roots(default_roots)
|
|
809
817
|
|
|
810
818
|
roots_text = ", ".join(allowed_roots) if allowed_roots else "(none)"
|
|
@@ -813,6 +821,7 @@ def setup_command(args: argparse.Namespace) -> int:
|
|
|
813
821
|
print(f" Controller URL : {controller_url}")
|
|
814
822
|
print(f" Client ID : {client_id}")
|
|
815
823
|
print(f" Hostname : {hostname}")
|
|
824
|
+
print(f" Owner user : {owner_user or '(everyone)'}")
|
|
816
825
|
print(f" Allowed roots : {roots_text}")
|
|
817
826
|
print()
|
|
818
827
|
if not _confirm(f"Write profile '{profile}' to {config_path}?", default_yes=True):
|
|
@@ -822,6 +831,7 @@ def setup_command(args: argparse.Namespace) -> int:
|
|
|
822
831
|
controller_url = default_controller_url
|
|
823
832
|
client_id = default_client_id
|
|
824
833
|
hostname = args.hostname or config.hostname or client_id
|
|
834
|
+
owner_user = default_user
|
|
825
835
|
allowed_roots = default_roots
|
|
826
836
|
|
|
827
837
|
raw_config = _load_toml(config_path) if config_path.exists() else {}
|
|
@@ -838,6 +848,9 @@ def setup_command(args: argparse.Namespace) -> int:
|
|
|
838
848
|
"allowed_roots": list(allowed_roots),
|
|
839
849
|
"max_concurrent_tasks": config.max_concurrent_tasks,
|
|
840
850
|
}
|
|
851
|
+
# Written only when set, keeping TOML files of non-users unchanged.
|
|
852
|
+
if owner_user:
|
|
853
|
+
servers[profile]["user"] = owner_user
|
|
841
854
|
|
|
842
855
|
migrated_files: list[Path] = []
|
|
843
856
|
creating_default_in_new_layout = (
|
|
@@ -99,6 +99,9 @@ class AgentRegisterMessage(ProtocolModel):
|
|
|
99
99
|
protocol_version: int
|
|
100
100
|
client_id: str | None = None
|
|
101
101
|
client_info: ClientInfo
|
|
102
|
+
# Server-side login account that owns this client. Optional; None/empty
|
|
103
|
+
# means public: every user sees (and may approve) it.
|
|
104
|
+
owner_user: str | None = None
|
|
102
105
|
capabilities: list[CapabilityDescriptor] = Field(default_factory=list)
|
|
103
106
|
roots: list[RootDescriptor] = Field(default_factory=list)
|
|
104
107
|
connectivity: ConnectivityState
|
|
@@ -24,7 +24,7 @@ def _build_common_payload(*, client_id: str, hostname: str, version: str, platfo
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def build_register_message(*, client_id: str, hostname: str, version: str, platform_name: str, capabilities: list[dict], roots: list[dict] | None = None, repositories: list[dict] | None = None, active_tasks: int, queued_tasks: int, max_concurrent_tasks: int, connected: bool = True) -> AgentRegisterMessage:
|
|
27
|
+
def build_register_message(*, client_id: str, hostname: str, version: str, platform_name: str, capabilities: list[dict], roots: list[dict] | None = None, repositories: list[dict] | None = None, active_tasks: int, queued_tasks: int, max_concurrent_tasks: int, connected: bool = True, owner_user: str | None = None) -> AgentRegisterMessage:
|
|
28
28
|
payload = _build_common_payload(
|
|
29
29
|
client_id=client_id,
|
|
30
30
|
hostname=hostname,
|
|
@@ -38,6 +38,10 @@ def build_register_message(*, client_id: str, hostname: str, version: str, platf
|
|
|
38
38
|
max_concurrent_tasks=max_concurrent_tasks,
|
|
39
39
|
connected=connected,
|
|
40
40
|
)
|
|
41
|
+
# Added only when non-empty: status messages never carry ownership, and
|
|
42
|
+
# an unset owner must not appear in the payload at all (see send_register).
|
|
43
|
+
if owner_user:
|
|
44
|
+
payload["owner_user"] = owner_user
|
|
41
45
|
return AgentRegisterMessage(**payload)
|
|
42
46
|
|
|
43
47
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bamboo-coding
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Bamboo Coding outbound client
|
|
5
5
|
Classifier: Operating System :: POSIX :: Linux
|
|
6
6
|
Classifier: Operating System :: Microsoft :: Windows
|
|
7
7
|
Classifier: Operating System :: MacOS
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
Requires-Dist: gitpython==3.1.40
|
|
11
11
|
Requires-Dist: websockets==13.1
|
|
12
12
|
Requires-Dist: pydantic>=2.0
|
|
13
|
-
Requires-Dist: bamboo-ssh>=0.2.
|
|
13
|
+
Requires-Dist: bamboo-ssh>=0.2.1
|
|
14
14
|
Requires-Dist: pyte>=0.8.2
|
|
15
15
|
Requires-Dist: psutil>=5.9
|
|
16
16
|
Requires-Dist: pywinpty>=2.0; sys_platform == "win32"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bamboo_coding-0.2.0 → bamboo_coding-0.2.2}/src/bamboo_coding/agents/builtin_skills/__init__.py
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|