Skip to content

Commit 36e75e7

Browse files
committed
Wrap the task artifact name check under the line limit
13188ac left it at 123 characters, which the lint job rejects.
1 parent f78ae4a commit 36e75e7

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎architecture_explore.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ iOS(WebDriverAgent)。核心能力是滑鼠/鍵盤控制、影像辨識、
2828
| 指標 | 數值 |
2929
| --- | ---: |
3030
| Python 模組總數(含周邊子專案) | 1,622 |
31-
| 程式碼總行數 | 252,569 |
31+
| 程式碼總行數 | 252,572 |
3232
| `je_auto_control/utils/` 子套件數 | 313 |
3333
| `AC_*` 動作指令數(`known_commands()` 實測) | 914 |
3434
| 套件門面 `__all__` 公開名稱數 | 1508 |
@@ -517,13 +517,13 @@ socket server 有 8 MiB 讀取上限與 30 秒 handler timeout。
517517

518518
### 5.4.9 AI / Agent / LLM
519519

520-
> 14 個套件、約 61,073 行。
520+
> 14 個套件、約 61,076 行。
521521
522522
| 模組 | 行數 | 職責 |
523523
| --- | ---: | --- |
524524
| `utils/a2a/` | 92 | A2A(agent-to-agent)agent card 產生 |
525525
| `utils/agent/` | 2,268 | 閉環 Computer-Use Agent 主迴圈 + Anthropic/OpenAI/Computer-Use 三後端 |
526-
| `utils/agent_runtime/` | 33,751 | 受管任務、服務、控制權世代、結果驗證與本機推論;所有入口共用執行層。 |
526+
| `utils/agent_runtime/` | 33,754 | 受管任務、服務、控制權世代、結果驗證與本機推論;所有入口共用執行層。 |
527527
| `utils/agent_memory/` | 178 | agent 的持久化情節記憶(goal → trajectory → outcome) |
528528
| `utils/agent_replay/` | 67 | 可攜的 agent 軌跡追蹤(記錄 observation→action 並重播) |
529529
| `utils/agent_trace/` | 172 | agent 可觀測性:OpenTelemetry GenAI 慣例的 LLM span |
@@ -1056,7 +1056,7 @@ socket server 有 8 MiB 讀取上限與 30 秒 handler timeout。
10561056
| `utils/self_healing/frame_locators.py` | 142 | 純影像比對與明確 VLM backend;共用區域、原點與縮放換算。 |
10571057
| `utils/self_healing/evaluation_io.py` | 188 | 有界且受路徑政策限制的本機資料集、原子 JSON/HTML 報告。 |
10581058

1059-
#### `utils/agent_runtime/`(33,751 行/242 檔)
1059+
#### `utils/agent_runtime/`(33,754 行/242 檔)
10601060

10611061
| 檔案 | 行數 | 職責 |
10621062
| --- | ---: | --- |
@@ -1115,7 +1115,7 @@ socket server 有 8 MiB 讀取上限與 30 秒 handler timeout。
11151115
| `dom_observation.py` | 196 | Normalize host-declared DOM fields of a managed browser session into the shared observation report. |
11161116
| `errors.py` | 31 | Typed failures for managed tasks, observations and control ownership. |
11171117
| `evidence.py` | 261 | Service-owned task provenance, redacted artifacts and thirty-day metadata retention. |
1118-
| `evidence_cache.py` | 92 | Database-bound evidence paths never turn historical journal references into filesystem ownership. |
1118+
| `evidence_cache.py` | 95 | Database-bound evidence paths never turn historical journal references into filesystem ownership. |
11191119
| `evidence_handoff.py` | 376 | Explicit revocable evidence-only grants preserve ordinary task ownership and input isolation. |
11201120
| `file_dialog_scope.py` | 62 | Bind the existing file-dialog executor to one task-owned window and rooted absolute path. |
11211121
| `file_target.py` | 35 | A noninteractive target for rooted archive workflows, separate from desktop input. |
@@ -1641,8 +1641,8 @@ socket 預設綁 `127.0.0.1`;資源一律用 `with`。
16411641
| `osx/` | 17 | 988 |
16421642
| `autocontrol-lsp/` | 8 | 744 |
16431643
| `utils/hotkey/` | 7 | 879 |
1644-
| 其餘模組(約 286 個 `utils/` 子套件 + `android/`/`ios/`/周邊小工具) | 1,076 | 114,507 |
1645-
| **總計** | **1,610** | **251,824** |
1644+
| 其餘模組(約 286 個 `utils/` 子套件 + `android/`/`ios/`/周邊小工具) | 1,076 | 114,510 |
1645+
| **總計** | **1,610** | **251,827** |
16461646

16471647

16481648
`gui/agent_observation_view.py` provides the bounded read-only agent element table and DPR-1 image selection preview. `gui/agent_tasks_tab.py` owns only request editing and Actions-menu translation; business validation remains in the headless runtime.

‎je_auto_control/utils/agent_runtime/evidence_cache.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def _directory(path: Path) -> None:
1919
raise AgentTaskError('task artifact directory escapes its owner cache')
2020

2121

22+
# The journal, its lock file and the never-deleted guard beside it (json_store's file lock), the report.
23+
_NAMES = frozenset({'journal.jsonl', 'journal.jsonl.lock', 'journal.jsonl.lock.guard', 'report.json'})
24+
25+
2226
class EvidenceCache:
2327
"""Bind cache identity to a persistent database nonce and its complete canonical path."""
2428

@@ -59,8 +63,7 @@ def directory(self, task_id: str) -> Path:
5963

6064
def file(self, task_id: str, name: str) -> Path:
6165
"""Reject redirected, nonregular or multiply linked current artifact files."""
62-
if name not in {'journal.jsonl', 'journal.jsonl.lock', 'journal.jsonl.lock.guard', 'report.json'} and re.fullmatch(
63-
'[0-9a-f]{32}\\.jpg', name) is None:
66+
if name not in _NAMES and re.fullmatch('[0-9a-f]{32}\\.jpg', name) is None:
6467
raise AgentTaskError('invalid task artifact filename')
6568
path = self.directory(task_id) / name
6669
if path.is_symlink() or resolved(path) != path:

0 commit comments

Comments
 (0)