Release beta 1.2.1.1019
check / local-gate (push) Failing after 16m58s

This commit is contained in:
JWeBot Contributors
2026-10-19 17:26:44 +08:00
parent e6d6ddf1c6
commit 3a7c11e44d
17 changed files with 162 additions and 77 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-config"
version = "1.2.0b1+1019"
version = "1.2.1b1+1019"
description = "Profile-based configuration compiler for JWeBot"
requires-python = ">=3.9"
dependencies = [
@@ -36,4 +36,4 @@ __all__ = [
"write_default_profile",
]
__version__ = "1.2.0b1+1019"
__version__ = "1.2.1b1+1019"
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-extension-host"
version = "1.2.0b1+1019"
version = "1.2.1b1+1019"
description = "Single-release, single-invocation process host for JWeBot extensions"
requires-python = ">=3.9"
dependencies = [
"jwebot-sdk==1.2.0b1+1019",
"jwebot-kernel==1.2.0b1+1019",
"jwebot-sdk==1.2.1b1+1019",
"jwebot-kernel==1.2.1b1+1019",
]
[project.scripts]
@@ -16,4 +16,4 @@ __all__ = [
"process_request",
]
__version__ = "1.2.0b1+1019"
__version__ = "1.2.1b1+1019"
+4 -4
View File
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-kernel"
version = "1.2.0b1+1019"
version = "1.2.1b1+1019"
description = "Stable routing and extension authority for JWeBot"
requires-python = ">=3.9"
dependencies = [
"jwebot-config==1.2.0b1+1019",
"jwebot-sdk==1.2.0b1+1019",
"jwebot-official-extensions==1.2.0b1+1019",
"jwebot-config==1.2.1b1+1019",
"jwebot-sdk==1.2.1b1+1019",
"jwebot-official-extensions==1.2.1b1+1019",
"tomli>=2; python_version < '3.11'",
]
@@ -107,4 +107,4 @@ __all__ = [
"verify_installed_release_signature",
]
__version__ = "1.2.0b1+1019"
__version__ = "1.2.1b1+1019"
@@ -819,8 +819,21 @@ def style_chat_reply_text(value: object) -> str:
return "\n".join(styled[:4])
def chat_reply_parts(value: object) -> list[str]:
lines = [
normalize_text(line)
for line in style_chat_reply_text(value).splitlines()
if normalize_text(line)
]
return [clean_reply(line) for line in lines]
def clean_chat_reply(value: object) -> str:
return clean_reply(style_chat_reply_text(value))
parts = chat_reply_parts(value)
if len(parts) == 1:
return parts[0]
return pack_reply_parts(parts)
def cloud_reply_text(value: object) -> str:
@@ -8631,60 +8644,75 @@ class EdgeApplication:
reply = str(row.get("result_text", ""))
if not reply:
raise EdgeError("cloud result is unavailable for delivery")
replies = unpack_reply_parts(reply) or [reply]
if any(not part or len(part) > MAX_REPLY_CHARS for part in replies):
raise EdgeError("cloud result is invalid for delivery")
runtime_python = Path(
os.environ.get("JWEBOT_RUNTIME_PYTHON", str(PYTHON))
).expanduser()
if not DELIVERY_HELPER.is_file() or not runtime_python.is_file():
raise EdgeError("delivery helper is unavailable")
payload = {
"event_id": str(row.get("event_id", "")),
"group_fingerprint": str(row.get("group_fingerprint", "")),
"reply": reply,
}
event_id = str(row.get("event_id", ""))
started = time.monotonic()
try:
result = subprocess.run(
[str(runtime_python), str(DELIVERY_HELPER)],
input=canonical_json(payload),
text=True,
capture_output=True,
timeout=60,
check=False,
for index, part in enumerate(replies, start=1):
part_event_id = (
f"{event_id}:part-{index}"
if event_id and len(replies) > 1
else event_id
)
except (OSError, subprocess.TimeoutExpired) as error:
self.telemetry.elapsed(
"edge.delivery.process",
started,
status="error",
event_id=row.get("event_id", ""),
group_id=row.get("group_fingerprint", ""),
process="delivery-helper",
error_type=type(error).__name__,
)
raise EdgeError("delivery helper transport failure") from error
if result.returncode != 0:
self.telemetry.elapsed(
"edge.delivery.process",
started,
status="error",
event_id=row.get("event_id", ""),
group_id=row.get("group_fingerprint", ""),
process="delivery-helper",
outcome=f"returncode-{result.returncode}",
)
output = f"{result.stdout}\n{result.stderr}".casefold()
if "selected chat changed" in output:
raise EdgeError("selected chat changed")
if "missing expected group" in output:
raise EdgeError("missing expected group")
raise EdgeError("delivery helper failed")
payload = {
"event_id": part_event_id,
"group_fingerprint": str(row.get("group_fingerprint", "")),
"reply": part,
}
try:
result = subprocess.run(
[str(runtime_python), str(DELIVERY_HELPER)],
input=canonical_json(payload),
text=True,
capture_output=True,
timeout=60,
check=False,
)
except (OSError, subprocess.TimeoutExpired) as error:
self.telemetry.elapsed(
"edge.delivery.process",
started,
status="error",
event_id=row.get("event_id", ""),
group_id=row.get("group_fingerprint", ""),
process="delivery-helper",
messages=len(replies),
failed_message=index,
error_type=type(error).__name__,
)
raise EdgeError("delivery helper transport failure") from error
if result.returncode != 0:
self.telemetry.elapsed(
"edge.delivery.process",
started,
status="error",
event_id=row.get("event_id", ""),
group_id=row.get("group_fingerprint", ""),
process="delivery-helper",
messages=len(replies),
failed_message=index,
outcome=f"returncode-{result.returncode}",
)
output = f"{result.stdout}\n{result.stderr}".casefold()
if "selected chat changed" in output:
raise EdgeError("selected chat changed")
if "missing expected group" in output:
raise EdgeError("missing expected group")
raise EdgeError("delivery helper failed")
self.telemetry.elapsed(
"edge.delivery.process",
started,
event_id=row.get("event_id", ""),
group_id=row.get("group_fingerprint", ""),
process="delivery-helper",
chars=len(reply),
chars=sum(len(part) for part in replies),
messages=len(replies),
)
def process_clock_once(
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-official-extensions"
version = "1.2.0b1+1019"
version = "1.2.1b1+1019"
description = "Reviewed local command adapters and broker implementation for JWeBot"
requires-python = ">=3.9"
dependencies = [
"jwebot-sdk==1.2.0b1+1019",
"jwebot-sdk==1.2.1b1+1019",
]
[tool.setuptools.packages.find]
@@ -90,4 +90,4 @@ __all__ = [
"render_feature_list",
]
__version__ = "1.2.0b1+1019"
__version__ = "1.2.1b1+1019"
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-sdk"
version = "1.2.0b1+1019"
version = "1.2.1b1+1019"
description = "Typed, capability-limited extension API for JWeBot plugins"
requires-python = ">=3.9"
dependencies = []
@@ -38,4 +38,4 @@ __all__ = [
"SingleGroupContext",
]
__version__ = "1.2.0b1+1019"
__version__ = "1.2.1b1+1019"