forgexa-cli 1.96.1__tar.gz → 1.96.3__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.
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/PKG-INFO +1 -1
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/__init__.py +1 -1
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/agent_core.py +5 -2
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/component_runtime.py +224 -3
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/daemon.py +25 -4
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/zcode_protocol.py +2 -1
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/PKG-INFO +1 -1
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/pyproject.toml +1 -1
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/README.md +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/_build_config.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/_local_bind.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/autoupgrade.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/aws_evidence.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/aws_logs_evidence.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/main.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/observability_contract.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/observability_evidence.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/py.typed +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli/runtime_evidence.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/SOURCES.txt +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/dependency_links.txt +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/entry_points.txt +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/requires.txt +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/forgexa_cli.egg-info/top_level.txt +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/setup.cfg +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_auth_and_runtime_commands.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_autoupgrade.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_check_command.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_expiry_warnings_and_revoke.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_local_bind_commands.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_publish_script.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_runtime_credentials.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_session_credentials.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_silent_install.py +0 -0
- {forgexa_cli-1.96.1 → forgexa_cli-1.96.3}/tests/test_upgrade_observability.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""forgexa-cli — Forgexa command-line client."""
|
|
2
|
-
__version__ = "1.96.
|
|
2
|
+
__version__ = "1.96.3"
|
|
@@ -2341,6 +2341,9 @@ class AgentDiscovery:
|
|
|
2341
2341
|
if probe_dir is None:
|
|
2342
2342
|
probe_dir = tempfile.TemporaryDirectory(prefix="forgexa-managed-discovery-")
|
|
2343
2343
|
env = managed.probe_environment(Path(probe_dir.name), env)
|
|
2344
|
+
execution_lease = component_runtime.current_execution()
|
|
2345
|
+
if managed is not None and managed is execution_lease:
|
|
2346
|
+
await asyncio.to_thread(managed.begin_spawn)
|
|
2344
2347
|
proc = await asyncio.create_subprocess_exec(
|
|
2345
2348
|
*parts,
|
|
2346
2349
|
stdin=asyncio.subprocess.DEVNULL,
|
|
@@ -2350,8 +2353,8 @@ class AgentDiscovery:
|
|
|
2350
2353
|
cwd=probe_dir.name if managed is not None else None,
|
|
2351
2354
|
**_agent_process_group_kwargs(),
|
|
2352
2355
|
)
|
|
2353
|
-
if managed is not None and managed is
|
|
2354
|
-
managed.
|
|
2356
|
+
if managed is not None and managed is execution_lease:
|
|
2357
|
+
await asyncio.to_thread(managed.record_process, proc.pid)
|
|
2355
2358
|
stdout, stderr = await asyncio.wait_for(proc.communicate(), timeout=10)
|
|
2356
2359
|
if proc.returncode != 0:
|
|
2357
2360
|
logger.warning(
|
|
@@ -47,7 +47,7 @@ def _private_directory(path: Path) -> None:
|
|
|
47
47
|
raise ComponentRuntimeError("component_storage_invalid")
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
def _record(path: Path, fields: set[str]) -> dict[str, Any] | None:
|
|
50
|
+
def _record(path: Path, fields: set[str], limit: int = RECORD_LIMIT) -> dict[str, Any] | None:
|
|
51
51
|
try:
|
|
52
52
|
descriptor = os.open(
|
|
53
53
|
path, os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0) | getattr(os, "O_NONBLOCK", 0)
|
|
@@ -63,8 +63,8 @@ def _record(path: Path, fields: set[str]) -> dict[str, Any] | None:
|
|
|
63
63
|
or metadata.st_mode & 0o077
|
|
64
64
|
):
|
|
65
65
|
raise ComponentRuntimeError("component_record_invalid")
|
|
66
|
-
data = stream.read(
|
|
67
|
-
if len(data) >
|
|
66
|
+
data = stream.read(limit + 1)
|
|
67
|
+
if len(data) > limit:
|
|
68
68
|
raise ComponentRuntimeError("component_record_invalid")
|
|
69
69
|
try:
|
|
70
70
|
value = json.loads(data)
|
|
@@ -128,6 +128,8 @@ class ManagedComponentLease:
|
|
|
128
128
|
self.owner_nonce = os.urandom(32).hex()
|
|
129
129
|
self.process_started = False
|
|
130
130
|
self.record_path = root / "leases" / f"{self.lease_id}.json"
|
|
131
|
+
self.process_directory = root / "leases" / f"{self.lease_id}.processes"
|
|
132
|
+
self.process_sequence = 0
|
|
131
133
|
digest = _digest(receipt["installation_id"].removeprefix("install-"))
|
|
132
134
|
self.directory = root / "versions" / digest
|
|
133
135
|
entry = receipt["entry_point"]
|
|
@@ -144,6 +146,93 @@ class ManagedComponentLease:
|
|
|
144
146
|
if entry["kind"] != "native":
|
|
145
147
|
self.argv_prefix.append(str(self.directory / _relative(entry["script"])))
|
|
146
148
|
|
|
149
|
+
def _write_process_event(self, stage: str, process_id: int | None = None) -> None:
|
|
150
|
+
if self.descriptor < 0 or self.process_sequence >= 256:
|
|
151
|
+
raise ComponentRuntimeError("component_usage_unavailable")
|
|
152
|
+
_private_directory(self.root)
|
|
153
|
+
_private_directory(self.root / "leases")
|
|
154
|
+
target = _component_target(self.root)
|
|
155
|
+
if target["target_id"] != self.receipt["target_id"]:
|
|
156
|
+
raise ComponentRuntimeError("component_target_changed")
|
|
157
|
+
record = _record(
|
|
158
|
+
self.record_path,
|
|
159
|
+
{
|
|
160
|
+
"schema_version",
|
|
161
|
+
"target_id",
|
|
162
|
+
"installation_id",
|
|
163
|
+
"lease_id",
|
|
164
|
+
"process_id",
|
|
165
|
+
"owner_nonce",
|
|
166
|
+
},
|
|
167
|
+
)
|
|
168
|
+
if record is None or (
|
|
169
|
+
record["lease_id"] != self.lease_id
|
|
170
|
+
or record["owner_nonce"] != self.owner_nonce
|
|
171
|
+
or record["process_id"] != os.getpid()
|
|
172
|
+
or record["target_id"] != self.receipt["target_id"]
|
|
173
|
+
or record["installation_id"] != self.receipt["installation_id"]
|
|
174
|
+
):
|
|
175
|
+
raise ComponentRuntimeError("component_usage_changed")
|
|
176
|
+
self.process_directory.mkdir(mode=0o700, exist_ok=True)
|
|
177
|
+
_private_directory(self.process_directory)
|
|
178
|
+
try:
|
|
179
|
+
owner_identity = _process_start_identity(os.getpid())
|
|
180
|
+
except ComponentRuntimeError:
|
|
181
|
+
owner_identity = None
|
|
182
|
+
process_identity = None
|
|
183
|
+
if process_id is not None:
|
|
184
|
+
if type(process_id) is not int or process_id <= 0:
|
|
185
|
+
raise ComponentRuntimeError("component_process_identity_unverified")
|
|
186
|
+
try:
|
|
187
|
+
process_identity = _process_start_identity(process_id)
|
|
188
|
+
except ComponentRuntimeError:
|
|
189
|
+
pass
|
|
190
|
+
sequence = self.process_sequence + 1
|
|
191
|
+
event = {
|
|
192
|
+
"schema_version": 1,
|
|
193
|
+
"lease_id": self.lease_id,
|
|
194
|
+
"target_id": record["target_id"],
|
|
195
|
+
"installation_id": record["installation_id"],
|
|
196
|
+
"owner_nonce": self.owner_nonce,
|
|
197
|
+
"owner_process_id": os.getpid(),
|
|
198
|
+
"owner_start_identity": owner_identity,
|
|
199
|
+
"sequence": sequence,
|
|
200
|
+
"stage": stage,
|
|
201
|
+
"process_id": process_id,
|
|
202
|
+
"process_start_identity": process_identity,
|
|
203
|
+
}
|
|
204
|
+
contents = json.dumps(event, sort_keys=True, separators=(",", ":")).encode() + b"\n"
|
|
205
|
+
path = self.process_directory / f"{sequence:06d}.json"
|
|
206
|
+
descriptor = os.open(
|
|
207
|
+
path,
|
|
208
|
+
os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_NOFOLLOW", 0),
|
|
209
|
+
0o600,
|
|
210
|
+
)
|
|
211
|
+
with os.fdopen(descriptor, "wb") as stream:
|
|
212
|
+
stream.write(contents)
|
|
213
|
+
stream.flush()
|
|
214
|
+
os.fsync(stream.fileno())
|
|
215
|
+
directory = os.open(self.process_directory, os.O_RDONLY | getattr(os, "O_DIRECTORY", 0))
|
|
216
|
+
try:
|
|
217
|
+
os.fsync(directory)
|
|
218
|
+
finally:
|
|
219
|
+
os.close(directory)
|
|
220
|
+
self.process_sequence = sequence
|
|
221
|
+
|
|
222
|
+
def begin_spawn(self) -> None:
|
|
223
|
+
self.process_started = True
|
|
224
|
+
try:
|
|
225
|
+
self._write_process_event("spawn_pending")
|
|
226
|
+
except OSError as error:
|
|
227
|
+
raise ComponentRuntimeError("component_usage_unavailable") from error
|
|
228
|
+
|
|
229
|
+
def record_process(self, process_id: int) -> None:
|
|
230
|
+
self.process_started = True
|
|
231
|
+
try:
|
|
232
|
+
self._write_process_event("spawn_started", process_id)
|
|
233
|
+
except OSError as error:
|
|
234
|
+
raise ComponentRuntimeError("component_usage_unavailable") from error
|
|
235
|
+
|
|
147
236
|
def wrap_command(self, command: list[str]) -> list[str]:
|
|
148
237
|
if not command or command[0] != self.argv_prefix[-1]:
|
|
149
238
|
raise ComponentRuntimeError("component_instance_changed")
|
|
@@ -268,6 +357,9 @@ class ManagedComponentLease:
|
|
|
268
357
|
def close(self) -> None:
|
|
269
358
|
if self.descriptor < 0:
|
|
270
359
|
return
|
|
360
|
+
if self.process_started:
|
|
361
|
+
self.retain_unknown_usage()
|
|
362
|
+
return
|
|
271
363
|
import fcntl
|
|
272
364
|
|
|
273
365
|
try:
|
|
@@ -401,6 +493,135 @@ def _process_start_identity(process_id: int) -> str:
|
|
|
401
493
|
return f"process-{process_id}-{struct.pack('!d', created).hex()}"
|
|
402
494
|
|
|
403
495
|
|
|
496
|
+
def _identity_alive(process_id: int, identity: str | None) -> bool | None:
|
|
497
|
+
if identity is None:
|
|
498
|
+
return None
|
|
499
|
+
try:
|
|
500
|
+
import psutil
|
|
501
|
+
except ImportError:
|
|
502
|
+
return None
|
|
503
|
+
try:
|
|
504
|
+
created = psutil.Process(process_id).create_time()
|
|
505
|
+
except psutil.NoSuchProcess:
|
|
506
|
+
return False
|
|
507
|
+
except (psutil.Error, OSError):
|
|
508
|
+
return None
|
|
509
|
+
if not math.isfinite(created) or created <= 0:
|
|
510
|
+
return None
|
|
511
|
+
return identity == f"process-{process_id}-{struct.pack('!d', created).hex()}"
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def inspect_usage(lease_id: str, root: Path | None = None) -> dict[str, Any]:
|
|
515
|
+
_identifier(lease_id)
|
|
516
|
+
root = default_store_root() if root is None else root
|
|
517
|
+
if os.name != "posix" or os.environ.get("WSL_DISTRO_NAME"):
|
|
518
|
+
raise ComponentRuntimeError("component_platform_unverified")
|
|
519
|
+
_private_directory(root)
|
|
520
|
+
_private_directory(root / "leases")
|
|
521
|
+
target = _component_target(root)
|
|
522
|
+
record = _record(
|
|
523
|
+
root / "leases" / f"{lease_id}.json",
|
|
524
|
+
{"schema_version", "target_id", "installation_id", "lease_id", "process_id", "owner_nonce"},
|
|
525
|
+
16_384,
|
|
526
|
+
)
|
|
527
|
+
if record is None:
|
|
528
|
+
raise ComponentRuntimeError("component_usage_missing")
|
|
529
|
+
if record["lease_id"] != lease_id or record["target_id"] != target["target_id"]:
|
|
530
|
+
raise ComponentRuntimeError("component_usage_changed")
|
|
531
|
+
_identifier(record["installation_id"])
|
|
532
|
+
_digest(record["owner_nonce"])
|
|
533
|
+
if type(record["process_id"]) is not int or record["process_id"] <= 0:
|
|
534
|
+
raise ComponentRuntimeError("component_record_invalid")
|
|
535
|
+
result = {
|
|
536
|
+
"schema_version": 1,
|
|
537
|
+
"target_id": target["target_id"],
|
|
538
|
+
"generation": target["generation"],
|
|
539
|
+
"lease_id": lease_id,
|
|
540
|
+
"installation_id": record["installation_id"],
|
|
541
|
+
"state": "legacy_unknown",
|
|
542
|
+
"owner_alive": None,
|
|
543
|
+
"processes": [],
|
|
544
|
+
}
|
|
545
|
+
directory = root / "leases" / f"{lease_id}.processes"
|
|
546
|
+
try:
|
|
547
|
+
_private_directory(directory)
|
|
548
|
+
except FileNotFoundError:
|
|
549
|
+
return result
|
|
550
|
+
paths = []
|
|
551
|
+
for path in directory.iterdir():
|
|
552
|
+
if len(paths) >= 256:
|
|
553
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
554
|
+
paths.append(path)
|
|
555
|
+
if not paths:
|
|
556
|
+
return result
|
|
557
|
+
events = []
|
|
558
|
+
fields = {
|
|
559
|
+
"schema_version",
|
|
560
|
+
"lease_id",
|
|
561
|
+
"target_id",
|
|
562
|
+
"installation_id",
|
|
563
|
+
"owner_nonce",
|
|
564
|
+
"owner_process_id",
|
|
565
|
+
"owner_start_identity",
|
|
566
|
+
"sequence",
|
|
567
|
+
"stage",
|
|
568
|
+
"process_id",
|
|
569
|
+
"process_start_identity",
|
|
570
|
+
}
|
|
571
|
+
for sequence, path in enumerate(sorted(paths), 1):
|
|
572
|
+
event = _record(path, fields, 16_384)
|
|
573
|
+
if (
|
|
574
|
+
event is None
|
|
575
|
+
or path.name != f"{sequence:06d}.json"
|
|
576
|
+
or (
|
|
577
|
+
type(event["sequence"]) is not int
|
|
578
|
+
or event["sequence"] != sequence
|
|
579
|
+
or event["lease_id"] != lease_id
|
|
580
|
+
or event["target_id"] != record["target_id"]
|
|
581
|
+
or event["installation_id"] != record["installation_id"]
|
|
582
|
+
or event["owner_nonce"] != record["owner_nonce"]
|
|
583
|
+
or type(event["owner_process_id"]) is not int
|
|
584
|
+
or event["owner_process_id"] != record["process_id"]
|
|
585
|
+
or event["stage"] not in {"spawn_pending", "spawn_started"}
|
|
586
|
+
)
|
|
587
|
+
):
|
|
588
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
589
|
+
owner_identity = event["owner_start_identity"]
|
|
590
|
+
if owner_identity is not None:
|
|
591
|
+
_identifier(owner_identity)
|
|
592
|
+
if events and owner_identity != events[0]["owner_start_identity"]:
|
|
593
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
594
|
+
if event["stage"] == "spawn_pending":
|
|
595
|
+
if event["process_id"] is not None or event["process_start_identity"] is not None:
|
|
596
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
597
|
+
else:
|
|
598
|
+
if not events or events[-1]["stage"] != "spawn_pending":
|
|
599
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
600
|
+
if type(event["process_id"]) is not int or event["process_id"] <= 0:
|
|
601
|
+
raise ComponentRuntimeError("component_process_journal_invalid")
|
|
602
|
+
identity = event["process_start_identity"]
|
|
603
|
+
if identity is not None:
|
|
604
|
+
_identifier(identity)
|
|
605
|
+
result["processes"].append(
|
|
606
|
+
{
|
|
607
|
+
"process_id": event["process_id"],
|
|
608
|
+
"start_identity": identity,
|
|
609
|
+
"alive": _identity_alive(event["process_id"], identity),
|
|
610
|
+
}
|
|
611
|
+
)
|
|
612
|
+
events.append(event)
|
|
613
|
+
result["owner_alive"] = _identity_alive(record["process_id"], events[0]["owner_start_identity"])
|
|
614
|
+
if result["owner_alive"] is True or any(
|
|
615
|
+
process["alive"] is True for process in result["processes"]
|
|
616
|
+
):
|
|
617
|
+
result["state"] = "active"
|
|
618
|
+
else:
|
|
619
|
+
result["state"] = (
|
|
620
|
+
"spawn_unknown" if events[-1]["stage"] == "spawn_pending" else "descendants_unknown"
|
|
621
|
+
)
|
|
622
|
+
return result
|
|
623
|
+
|
|
624
|
+
|
|
404
625
|
def runtime_capabilities(
|
|
405
626
|
runtime_instance_id: str, root: Path | None = None
|
|
406
627
|
) -> dict[str, Any] | None:
|
|
@@ -142,10 +142,31 @@ async def _create_subprocess_exec(*command, **kwargs):
|
|
|
142
142
|
# Desktop stdin is its parent-liveness control pipe, never child input.
|
|
143
143
|
# Agent callers that need prompt input explicitly pass subprocess.PIPE.
|
|
144
144
|
kwargs.setdefault("stdin", asyncio.subprocess.DEVNULL)
|
|
145
|
-
process = await asyncio.create_subprocess_exec(*command, **kwargs)
|
|
146
145
|
lease = component_runtime.current_execution()
|
|
147
|
-
|
|
148
|
-
lease
|
|
146
|
+
tracked = (
|
|
147
|
+
lease is not None
|
|
148
|
+
and bool(original_command)
|
|
149
|
+
and original_command[0] == lease.argv_prefix[-1]
|
|
150
|
+
)
|
|
151
|
+
if tracked:
|
|
152
|
+
await asyncio.to_thread(lease.begin_spawn)
|
|
153
|
+
process = await asyncio.create_subprocess_exec(*command, **kwargs)
|
|
154
|
+
if tracked:
|
|
155
|
+
try:
|
|
156
|
+
await asyncio.to_thread(lease.record_process, process.pid)
|
|
157
|
+
except (OSError, component_runtime.ComponentRuntimeError):
|
|
158
|
+
agent_core._kill_proc(process)
|
|
159
|
+
try:
|
|
160
|
+
await asyncio.wait_for(process.wait(), timeout=5)
|
|
161
|
+
except (asyncio.TimeoutError, OSError) as exc:
|
|
162
|
+
raise component_runtime.ComponentRuntimeError(
|
|
163
|
+
"component_process_cleanup_unconfirmed"
|
|
164
|
+
) from exc
|
|
165
|
+
if process.returncode is None:
|
|
166
|
+
raise component_runtime.ComponentRuntimeError(
|
|
167
|
+
"component_process_cleanup_unconfirmed"
|
|
168
|
+
)
|
|
169
|
+
raise
|
|
149
170
|
return process
|
|
150
171
|
|
|
151
172
|
|
|
@@ -1391,7 +1412,7 @@ except (ImportError, ModuleNotFoundError):
|
|
|
1391
1412
|
# DAEMON_VERSION is the protocol/logic version of the daemon code.
|
|
1392
1413
|
# Kept in sync with pyproject.toml version via bump-version.sh.
|
|
1393
1414
|
# CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
|
|
1394
|
-
DAEMON_VERSION = "1.96.
|
|
1415
|
+
DAEMON_VERSION = "1.96.3"
|
|
1395
1416
|
|
|
1396
1417
|
|
|
1397
1418
|
def _detect_client_type() -> str:
|
|
@@ -195,6 +195,7 @@ class ZCodeProtocolSession:
|
|
|
195
195
|
command = self.component_lease.wrap_command(command)
|
|
196
196
|
process_env = {**(process_env if process_env is not None else os.environ),
|
|
197
197
|
"DISABLE_UPDATES": "1", "DISABLE_AUTOUPDATER": "1"}
|
|
198
|
+
await asyncio.to_thread(self.component_lease.begin_spawn)
|
|
198
199
|
self._process = await asyncio.create_subprocess_exec(
|
|
199
200
|
*command,
|
|
200
201
|
stdin=asyncio.subprocess.PIPE,
|
|
@@ -206,7 +207,7 @@ class ZCodeProtocolSession:
|
|
|
206
207
|
**agent_core._agent_process_group_kwargs(),
|
|
207
208
|
)
|
|
208
209
|
if self.component_lease is not None:
|
|
209
|
-
self.component_lease.
|
|
210
|
+
await asyncio.to_thread(self.component_lease.record_process, self._process.pid)
|
|
210
211
|
self._reader_task = asyncio.create_task(self._read_loop())
|
|
211
212
|
self._stderr_task = asyncio.create_task(self._read_stderr())
|
|
212
213
|
|
|
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
|