Commit Graph
789 Commits
Author SHA1 Message Date
Sycun cfaa95d7bd refactor(runtime): remove Eino and make Pi the sole agent engine
Delete the Eino model adapters, callbacks, middleware, orchestration,
summarization and single-agent runner together with their dependencies.
Chat, batch tasks, workflow Agent nodes and sub-agents now share the Pi
runtime, and dispatch is a single code path instead of an engine switch.

Configuration migrates eino_middleware/eino_skills to runtime/skills and
drops the retired callback settings while old files still load. Settings,
i18n and docs describe Pi only. Also carry the Pi follow-up fixes: empty
required lists are omitted from tool schemas, historical tool results stay
with their call batch, model proxies work over HTTP/1.1, single-query
retrieval skips query expansion, and finalization docs match Pi lifecycle
events.
2026-11-12 17:55:36 +08:00
Sycun 35508eb614 feat(pi): add the Pi agent runtime with native workflow and retrieval engines
Introduce an isolated Node worker that hosts the Pi SDK while Go keeps
business state, permissions, MCP execution, evidence and delivery checks.
The worker is published per source fingerprint, streams events back to Go
and supports tool callbacks, cancellation, session resume and per-model
transport settings.

Agent dispatch, tool search, plan/task tools and migration controls are
wired on top of it: large tool catalogs load through Pi tool_search, the
conversation task board keeps its existing tools, and legacy mode/route
values still resolve. Workflow gains a native DAG with versioned JSON
checkpoints, and knowledge retrieval moves to native documents, splitter,
HTTP embeddings, vector search and reranking.
2026-11-12 17:55:33 +08:00
Sycun e4de840086 fix(multiagent): repair interleaved agentic stream indices 2026-11-06 21:26:00 +08:00
Ed1s0nZ 195540b619 fix(headers): mask private names and stabilize empty audit configuration 2026-11-02 17:22:52 +08:00
Ed1s0nZ 5feea8d3c3 fix(headers): isolate credentials across audit, redirects and probes 2026-11-02 17:18:12 +08:00
Ed1s0nZ 585c95a0e2 Merge commit '0340c07363720e356b4cd7adafe343cbee804764' into codex/pr379-header-boundaries 2026-11-02 17:13:25 +08:00
Ed1s0nZ 02b295d738 Merge main and preserve both changelog additions for #378 2026-11-02 15:38:16 +08:00
Ed1s0nZ 697e875fa4 feat: make agent task timeout configurable 2026-10-31 16:43:25 +08:00
nightslient 691dbd0107 test(headers): 覆盖自定义请求头注入与测试连接链路
- applyCustomHeaders:覆盖内置头、跳过空值、无配置时保持原行为
- headersRoundTripper:经 Eino 传输链端到端验证头已下发
- %session_id%:有会话时替换、无会话时跳过该头
- TestOpenAI:测试连接会携带静态头,%session_id% 填充探测值,
  未配置 headers 时仍使用 Bearer <api_key>
2026-10-30 20:16:27 +08:00
root d6b0aed1de feat(headers): 支持为 AI 渠道配置自定义 HTTP 请求头
部分 OpenAI 兼容供应商(如 opencode)要求私有鉴权头或会话头,
而非标准的 Authorization: Bearer,导致无法接入。

- config: OpenAIConfig / AIChannelConfig 新增 headers 字段,
  值支持 ${ENV_VAR}、${ENV_VAR:-default} 与 %session_id% 占位符
- openai: 新增 headersRoundTripper 接入 Eino ChatModel 传输链,
  同名的内置头(Authorization/User-Agent 等)可被覆盖
- openai: 内置 Client 的 4 处出站请求同样注入自定义头
- handler: 任务开始时把对话 ID 注入 ctx,供 %session_id% 替换;
  连接测试没有真实会话,使用探测值 connect-test
- web: 渠道设置页新增“自定义请求头”编辑区(每行 KEY=VALUE)
- 占位符使用 %session_id% 而非 {{session_id}},因为 index.html
  由 Go html/template 渲染,双花括号会被当作模板函数解析
2026-10-30 20:13:56 +08:00
Ed1s0nZ bc0b288d40 Fix audit model thinking compatibility 2026-10-30 16:11:07 +08:00
Sycun baa1d02cd4 feat(vulnerabilities): offer Markdown and Word report downloads 2026-10-30 09:29:44 +08:00
Ed1s0nZ c0d5c8460b feat(api): add durable asynchronous conversation runs 2026-10-23 11:45:15 +08:00
Ed1s0nZ 5c5c5e199d fix(openai): preserve provider-specific reasoning disable intent (#366) 2026-10-21 15:43:53 +08:00
Ed1s0nZ be2c8c04e5 fix(rbac): protect built-in administrator from losing access 2026-10-19 16:44:14 +08:00
Ed1s0nZ 63955c4d30 docs: remove internal process journals and organize public guides 2026-10-16 16:59:01 +08:00
Ed1s0nZ ee5e4dd7c7 Merge remote-tracking branch 'origin/main' into codex/fix-fofa-region 2026-10-16 16:17:04 +08:00
Ed1s0nZ 0c0d4a53e8 fix: use supported FOFA region return field and preserve asset location 2026-10-16 16:14:39 +08:00
公明 f8cbb5efe8 Merge pull request #362 from Sycun/codex/fix-328-sqlite-asset-lock
fix: serialize SQLite asset writes without multiplying busy waits
2026-10-16 13:38:56 +08:00
Sycun 51d78fda91 fix: bound SQLite lock waits and strengthen PR 329 coverage 2026-10-16 12:22:42 +08:00
Ordinary 9891b04215 fix: wait out SQLite busy on concurrent asset upserts
Deep mode fires many create_asset calls at once. UpsertAssets used a
DEFERRED transaction (SELECT then INSERT) on a 25-connection pool, so
writers hit SQLITE_BUSY immediately and returned "database is locked"
in a few milliseconds instead of waiting.

Open SQLite with _txlock=immediate and a 30s busy timeout, shrink the
pool, and retry locked upserts. Add a 32-way concurrent upsert test.
2026-10-16 12:20:21 +08:00
Sycun e21ac52b62 test: make workspace inventory fixtures portable on Windows 2026-10-16 12:09:32 +08:00
Sycun 7bf9eb8511 Merge main and reconcile project resume with checkpoint index limits 2026-10-16 11:15:11 +08:00
Sycun ac42b925da Merge remote-tracking branch 'origin/main' into codex/project-resume-reuse 2026-10-16 11:11:04 +08:00
Sycun 0fb5484657 Merge upstream main and resolve context memory asset conflicts 2026-10-16 11:02:49 +08:00
公明 7ad837c636 Merge pull request #354 from Sycun/codex/token-usage-monitoring
feat: add detailed token usage monitoring and cache write metrics
2026-10-16 10:59:00 +08:00
Sycun 6f991167a4 fix: restore project artifacts and test outcomes when resuming tasks 2026-10-15 22:02:22 +08:00
公明 63f3797ea8 Merge pull request #353 from Sycun/codex/fix-summary-length
fix: recover summary limits and sanitize agentic tool history
2026-10-15 21:23:53 +08:00
Ed1s0nZ 5ff781bdb7 fix: distinguish task deadlines from child operation timeouts 2026-10-15 14:24:31 +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 &#x2F;/&quot;;
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
Sycun 983c981b92 fix: preserve human intent through planning and restart while keeping legacy edits
Mark generated execution prompts, populate deterministic user sections from actual human entries, preserve canonical ledger on overflow/transient restarts, fit long human entries under their formatted budget, and keep unchanged historical keys editable. Add real reduction-to-snapshot Cookie recovery and production entry-point regression tests.
2026-10-12 19:34:24 +08:00
Sycun 8149201ef2 fix: carry canonical user ledger through native model-input merging 2026-10-12 18:08:59 +08:00
Sycun b642fc7c83 fix: preserve compaction provenance through resume and harden memory retrieval
Carry allowlisted summary origin and host user ledger across the trace recovery boundary. Keep immutable snapshot links after alias failures, scope legacy padded keys, remove stale indexes under small budgets, reuse retrieval clues for labels, and add cross-platform memory CI.
2026-10-12 17:56:43 +08:00
Sycun 4f0a3049cb fix: recover summary limits and sanitize agentic tool history 2026-10-12 16:49:22 +08:00
Sycun 2c311a6ab1 fix: harden checkpoint provenance, scope and atomic binding 2026-10-12 10:49:23 +08:00
Sycun 015e16457e fix: label generated context provenance in transcript evidence 2026-10-12 10:14:25 +08:00
Sycun 60d76be064 fix: exclude generated summaries from original user intent 2026-10-12 10:10:52 +08:00
Sycun 6b8bbbe91b feat: scope automatic working memory to the current conversation 2026-10-12 09:59:15 +08:00
Sycun 1d2e900e88 feat: simplify snapshot retrieval and add readable timestamps 2026-10-12 00:33:17 +08:00
Sycun e073709e8f fix: preserve evidence across truncated indexes and failed writes 2026-10-11 23:58:07 +08:00
Sycun 68c01d3429 feat: index compaction evidence for targeted context recovery 2026-10-11 23:43:07 +08:00
Sycun 616726d452 feat: persist compaction checkpoints in the project blackboard 2026-10-11 23:08:54 +08:00
Sycun b3d3f48c40 feat: add detailed token usage monitoring and cache write metrics 2026-10-11 22:30:30 +08:00
Ed1s0nZ 7f8dab4ec9 feat: reconcile SQLite tables and columns at startup 2026-10-10 20:45:39 +08:00
Ed1s0nZ 9f111a1389 fix: normalize missing deletes and empty REST lists 2026-10-10 18:02:02 +08:00
Ed1s0nZ 1ecbd4054c fix: reject stale concurrent interception rule saves 2026-10-10 17:18:13 +08:00
Ed1s0nZ a8321c4bff fix(vulnerability): allow standalone manual findings and validate links 2026-10-10 16:03:42 +08:00
Ed1s0nZ 088d6da3c1 fix(rbac): revoke only affected role sessions 2026-10-10 15:42:42 +08:00