Commit Graph

36 Commits

Author SHA1 Message Date
Sycun d0da169209 refactor(config): align context optimization with upstream Pi policy 2026-11-13 19:54:11 +08:00
Sycun 0dd997ca01 refactor(runtime): remove Eino and make Pi the sole agent engine 2026-11-11 12:45:32 +08:00
Sycun d7e8a29dfe feat(ai): add local model context profile and runtime window probe
- Probe Ollama, llama.cpp, LM Studio and vLLM runtime context windows, including reverse-proxy subpaths
- Add context_window and context_profile=local: clamp budgets, compaction triggers, tool-output limits and always-visible tools
- Count tool schemas in the soft input budget and apply a 10% token estimate margin for local tokenizers
- Prefer max_tokens for local requests across agent, attack-chain, FOFA, workflow and HITL paths, and honor channel extra_request_fields
- Recognize local context-overflow errors and retry with aggressive compaction
2026-10-21 00:12:57 +08:00
Sycun 3d2dfdac36 feat: verify attack-chain nodes against real tool calls
A node claiming something ran must cite a tool_call_id the host issued in
the trajectory. A citation absent from the trajectory is invented, so the
node is dropped along with its edges; a missing citation counts as invented
only when every real ID survived budget fitting, so a trimmed payload cannot
silently empty a graph. Judging is skipped where the evidence cannot be
enumerated: the process-detail supplement dumps raw event JSON and the
messages-table fallback carries no call IDs. Verified citations land in node
metadata rather than tool_execution_id, which is foreign-keyed to
tool_executions.

Also close two smaller holes: fact text can no longer carry the host index
delimiters, which would close the block early and spill the remaining index
into the system prompt; and the console fact endpoints reject the reserved
note/context-* prefix, matching the MCP tool layer.
2026-10-13 00:10:33 +08:00
Sycun 16189e0b76 fix: close review findings in context memory, attack chain and blackboard
Attack chain: failure text goes to textContent, so opt out of i18next
interpolation escaping that rendered upstream errors as //";
give regenerate its own message key; keep the summary card expanded across
a 409 refresh; probe for a cached graph before parsing last_react_input so
polling no longer re-reads a multi-megabyte column; hide the card in the
node-details exclusive state and bound it on narrow screens; drop the dead
hardcoded Chinese title from the API payload.

Blackboard: stop mirroring note/context-* keys into the fact body links
section, which get_project_fact returns verbatim without scope filtering;
single-line category and confidence in index rows so a newline cannot inject
a fake row; make the path overview fail closed on an empty index set.

Provenance: reuse fitUserIntentLedgerText when sanitizing a ledger entry so
a single entry cannot exceed its cap by the three ellipsis runes.

The .cjs harness now escapes interpolated values like real i18next, so the
existing XSS test also pins the escapeValue opt-out.
2026-10-12 23:16:33 +08:00
Sycun 2b76b31355 fix: preserve attack-chain summary provenance and evidence access 2026-10-12 20:58:45 +08:00
公明 5720de0d27
Add files via upload 2026-08-18 20:36:34 +08:00
公明 55ee5fbac9
Delete internal directory 2026-08-18 20:14:29 +08:00
公明 9f38fda15f
Add files via upload 2026-08-15 02:12:18 +08:00
公明 2910289f0b
Delete internal directory 2026-08-15 01:54:26 +08:00
公明 90cd119a83
Add files via upload 2026-06-20 19:35:06 +08:00
公明 01b361e4a7
Add files via upload 2026-06-18 12:42:56 +08:00
公明 cf1f8515d9
Delete internal directory 2026-06-18 12:37:39 +08:00
公明 d1dc15fa44
Add files via upload 2026-05-19 16:27:29 +08:00
公明 30afd71c05
Add files via upload 2026-05-11 19:56:38 +08:00
公明 80c4299dbb
Add files via upload 2026-05-06 21:26:38 +08:00
公明 62a0d8cb71
Add files via upload 2026-04-28 11:40:09 +08:00
公明 b2b166972a
Add files via upload 2026-04-28 00:33:29 +08:00
公明 2de0bd4d31
Add files via upload 2026-04-19 01:25:30 +08:00
公明 5ef7618f44
Delete internal directory 2026-04-19 01:14:50 +08:00
公明 e7609c5fc4
Add files via upload 2026-04-03 22:09:23 +08:00
公明 09b0104403
Add files via upload 2026-01-13 01:18:59 +08:00
公明 c41dfed5f3
Add files via upload 2025-12-27 02:30:34 +08:00
公明 ef169ba307
Add files via upload 2025-12-24 23:14:37 +08:00
公明 e860c84975
Add files via upload 2025-12-24 17:23:14 +08:00
公明 da568c442a
Add files via upload 2025-12-24 13:25:20 +08:00
公明 4a183078ea
Add files via upload 2025-12-24 06:48:34 +08:00
公明 2df9c21d80
Add files via upload 2025-12-24 05:08:26 +08:00
公明 74a4ec7be3
Add files via upload 2025-12-24 01:16:10 +08:00
公明 5af97bff27
Add files via upload 2025-12-19 00:24:06 +08:00
公明 95fc939b5a
Add files via upload 2025-12-17 23:46:47 +08:00
公明 8ffdbbae52
Add files via upload 2025-11-25 22:48:01 +08:00
公明 bc5b368ece
Add files via upload 2025-11-22 03:01:50 +08:00
公明 09b14bfbf5
Update builder.go 2025-11-18 00:07:15 +08:00
公明 fb8bb445ae
Modify message handling for user input in builder.go 2025-11-17 19:49:31 +08:00
公明 9f862ce721
Add files via upload 2025-11-17 02:43:36 +08:00