refactor(team): keep session UI and task tools keyed by IDs
This commit is contained in:
1 parent
999f30aae9
commit
0eb1bb52e2
315 files changed
+5825
-4067
No files matched your search
@@ -18,6 +18,7 @@
|
||||
"@deepseek-ai/dsh-agent-instructions": "workspace:*",
|
||||
"@deepseek-ai/dsh-agent-loop": "workspace:*",
|
||||
"@deepseek-ai/dsh-agent-preset-registry": "workspace:*",
|
||||
"@deepseek-ai/dsh-agent-team": "workspace:*",
|
||||
"@deepseek-ai/dsh-agent-tool-presentation": "workspace:*",
|
||||
"@deepseek-ai/dsh-anonymous-user-id": "workspace:*",
|
||||
"@deepseek-ai/dsh-api-gateway": "workspace:*",
|
||||
@@ -32,13 +33,8 @@
|
||||
"@deepseek-ai/dsh-client-connection": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-file-upload": "workspace:*",
|
||||
"@deepseek-ai/dsh-cmdline": "workspace:*",
|
||||
"@deepseek-ai/dsh-command-feedback": "workspace:*",
|
||||
"@deepseek-ai/dsh-file-reference": "workspace:*",
|
||||
"@deepseek-ai/dsh-message-feedback": "workspace:*",
|
||||
"@deepseek-ai/dsh-native-command": "workspace:*",
|
||||
"@deepseek-ai/dsh-ptc-runtime": "workspace:*",
|
||||
"@deepseek-ai/dsh-ptc-runtime-node": "workspace:*",
|
||||
"@deepseek-ai/dsh-command-compact": "workspace:*",
|
||||
"@deepseek-ai/dsh-command-feedback": "workspace:*",
|
||||
"@deepseek-ai/dsh-command-goal": "workspace:*",
|
||||
"@deepseek-ai/dsh-commands": "workspace:*",
|
||||
"@deepseek-ai/dsh-compaction": "workspace:*",
|
||||
@@ -50,6 +46,7 @@
|
||||
"@deepseek-ai/dsh-credentials": "workspace:*",
|
||||
"@deepseek-ai/dsh-deepseek-account": "workspace:*",
|
||||
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "workspace:*",
|
||||
"@deepseek-ai/dsh-file-reference": "workspace:*",
|
||||
"@deepseek-ai/dsh-fs": "workspace:*",
|
||||
"@deepseek-ai/dsh-fs-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-fs-observation-policy": "workspace:*",
|
||||
@@ -65,11 +62,14 @@
|
||||
"@deepseek-ai/dsh-launch-environment": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-deepseek": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-deepseek-api-key": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-deepseek-account": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-deepseek-api-key": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-pi-ai": "workspace:*",
|
||||
"@deepseek-ai/dsh-llm-retry": "workspace:*",
|
||||
"@deepseek-ai/dsh-mcp-client": "workspace:*",
|
||||
"@deepseek-ai/dsh-message-feedback": "workspace:*",
|
||||
"@deepseek-ai/dsh-native-command": "workspace:*",
|
||||
"@deepseek-ai/dsh-otel": "workspace:*",
|
||||
"@deepseek-ai/dsh-output-retention": "workspace:*",
|
||||
"@deepseek-ai/dsh-permission-presets": "workspace:*",
|
||||
"@deepseek-ai/dsh-persona": "workspace:*",
|
||||
@@ -77,6 +77,8 @@
|
||||
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
|
||||
"@deepseek-ai/dsh-plugin-market": "workspace:*",
|
||||
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "workspace:*",
|
||||
"@deepseek-ai/dsh-ptc-runtime": "workspace:*",
|
||||
"@deepseek-ai/dsh-ptc-runtime-node": "workspace:*",
|
||||
"@deepseek-ai/dsh-pwsh-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-repeat-tool-reminder": "workspace:*",
|
||||
"@deepseek-ai/dsh-sandbox": "workspace:*",
|
||||
@@ -104,11 +106,9 @@
|
||||
"@deepseek-ai/dsh-skill": "workspace:*",
|
||||
"@deepseek-ai/dsh-skill-filesystem": "workspace:*",
|
||||
"@deepseek-ai/dsh-skill-office": "workspace:*",
|
||||
"@deepseek-ai/dsh-spill": "workspace:*",
|
||||
"@deepseek-ai/dsh-storage": "workspace:*",
|
||||
"@deepseek-ai/dsh-storage-domain": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-workspace-dependencies": "workspace:*",
|
||||
"@deepseek-ai/dsh-spill": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent-acp": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent-fork-in-process": "workspace:*",
|
||||
@@ -121,6 +121,7 @@
|
||||
"@deepseek-ai/dsh-time-context": "workspace:*",
|
||||
"@deepseek-ai/dsh-timeout": "workspace:*",
|
||||
"@deepseek-ai/dsh-token-meter": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-agent-team": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-ask-user": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-bash": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-bash-persistent": "workspace:*",
|
||||
@@ -134,6 +135,7 @@
|
||||
"@deepseek-ai/dsh-tool-present": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-pwsh": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-pwsh-persistent": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-skill": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-str-replace-editor": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-subagent": "workspace:*",
|
||||
@@ -141,6 +143,8 @@
|
||||
"@deepseek-ai/dsh-tool-todo": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-web": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-workflow": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-working-directory": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-workspace-dependencies": "workspace:*",
|
||||
"@deepseek-ai/dsh-tools": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-protocol": "workspace:*",
|
||||
"@deepseek-ai/dsh-typert-registry": "workspace:*",
|
||||
@@ -156,10 +160,8 @@
|
||||
"@deepseek-ai/dsh-web-search-perplexity": "workspace:*",
|
||||
"@deepseek-ai/dsh-workflow": "workspace:*",
|
||||
"@deepseek-ai/dsh-workflow-ptc": "workspace:*",
|
||||
"@deepseek-ai/dsh-otel": "workspace:*",
|
||||
"@deepseek-ai/dsh-working-directory": "workspace:*",
|
||||
"@deepseek-ai/dsh-workspace": "workspace:*",
|
||||
"@deepseek-ai/schemastery": "workspace:~",
|
||||
"@deepseek-ai/dsh-tool-working-directory": "workspace:*",
|
||||
"@deepseek-ai/dsh-working-directory": "workspace:*"
|
||||
"@deepseek-ai/schemastery": "workspace:~"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"finalResponse": "TEAM_MODE_OK",
|
||||
"auditEvents": [
|
||||
{
|
||||
"type": "team/mode",
|
||||
"seq": 3,
|
||||
"time": 0,
|
||||
"data": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "team/mode",
|
||||
"seq": 4,
|
||||
"time": 0,
|
||||
"data": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"auditNotifications": [
|
||||
{
|
||||
"method": "session.event",
|
||||
"event": {
|
||||
"type": "team/mode",
|
||||
"seq": 3,
|
||||
"time": 0,
|
||||
"data": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "session.event",
|
||||
"event": {
|
||||
"type": "team/mode",
|
||||
"seq": 4,
|
||||
"time": 0,
|
||||
"data": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"assistantTexts": [
|
||||
"TEAM_MODE_OK"
|
||||
]
|
||||
}
|
||||
@@ -1,18 +1,26 @@
|
||||
"""Raw audit projection paired with the translator's actual native Loader request tests."""
|
||||
"""Raw Session event projection paired with owning runtime and recorded-session tests."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from deepseek_harness import DeepSeekHarness
|
||||
|
||||
|
||||
EXPECTED = Path(__file__).parent / "expected" / "cot-translation-projection.json"
|
||||
EXPECTED_ROOT = Path(__file__).parent / "expected"
|
||||
|
||||
|
||||
def test_common_translation_records_retain_raw_audit_and_original_main_response(tmp_path: Path) -> None:
|
||||
expected = json.loads(EXPECTED.read_text(encoding="utf-8"))
|
||||
@pytest.mark.parametrize("fixture, event_types", [
|
||||
("cot-translation-projection.json", ("plugin:translator/request", "plugin:translator/result")),
|
||||
("team-mode-projection.json", ("team/mode",)),
|
||||
])
|
||||
def test_session_records_retain_raw_events_and_original_main_response(
|
||||
tmp_path: Path, fixture: str, event_types: tuple[str, ...],
|
||||
) -> None:
|
||||
expected = json.loads((EXPECTED_ROOT / fixture).read_text(encoding="utf-8"))
|
||||
script = tmp_path / "audit_runtime.py"
|
||||
script.write_text(
|
||||
"""
|
||||
@@ -58,11 +66,11 @@ for line in sys.stdin:
|
||||
result = harness.run([{"type": "text", "text": "Keep the original response."}], session_id="sdk-audit")
|
||||
audit_notifications = [notification for notification in result.notifications
|
||||
if notification.method == "session.event"
|
||||
and notification.payload["event"]["type"] in ("plugin:translator/request", "plugin:translator/result")]
|
||||
and notification.payload["event"]["type"] in event_types]
|
||||
assert all(notification.payload["sessionId"] == result.session_id for notification in audit_notifications)
|
||||
projection = {
|
||||
"finalResponse": result.final_response,
|
||||
"auditEvents": [event for event in result.events if event["type"] in ("plugin:translator/request", "plugin:translator/result")],
|
||||
"auditEvents": [event for event in result.events if event["type"] in event_types],
|
||||
"auditNotifications": [{"method": notification.method, "event": notification.payload["event"]}
|
||||
for notification in audit_notifications],
|
||||
"assistantTexts": [block["text"] for event in result.events if event["type"] == "assistant/message"
|
||||
|
||||
Reference in new issue
Block a user