Autumn-27
338e77c064
fix(skills): 修复技能压缩包上传失败与中文命名被判非法
...
- 补上 bzip2 / Zstandard 解压器(标准库 + 已有的 klauspost/compress,不引新依赖),
不再对压缩软件非默认档位打出的包抛 "zip: unsupported compression";
Deflate64/LZMA/XZ/PPMd 等真解不了的方式与加密包改为解压前给出中文提示,
点名文件、压缩方式与重新打包的办法
- 技能内文件路径校验从 [A-Za-z0-9-_./] 的 ASCII 白名单改为 Unicode 黑名单:
放行各语言文件名与空格,仍拒绝控制字符、非法 UTF-8、零宽与双向控制字符、
\ % # ? * : " < > | 及 .. / 绝对路径 / 空路径段,防目录穿越行为不变
- 技能名放开非 ASCII 字母数字(中文可直接作技能名),ASCII 仍守 agentskills.io
规范,空格、点与路径分隔符照旧拒绝
- Windows 压缩软件按 GBK 写的文件名兜底解码后再校验;frontmatter 的
name: "中文技能" 去引号
- 新增 8 个测试:zstd 包、GBK 包、不支持的压缩方式、加密包、目录穿越、名称与
路径校验
2026-08-31 11:37:44 -04:00
Autumn
99fb78df1c
Merge pull request #78 from begininvoke/redgem/security-fix-a64cefdb
...
Fix possible fix(deps): 2 vulnerable dependencies in go.mod
2026-08-31 23:23:49 +08:00
Autumn-27
acd1ac29d7
feat(assets): 去掉企业资产范围 256 条规则上限
...
逐个 IP / 域名录范围的企业很容易撞上这个上限,撞上之后只能拆成多个企业,
而范围本身并不因为条数多就更慢。
- db:删掉 MaxCompanyScopeRules 常量、请求条数校验与
ensureCompanyScopeCapacityTx(每企业持久化总数的事务内校验)
- 前端:去掉 MAX_COMPANY_SCOPE_RULES 与「剩余额度」计算,追加范围弹窗不再
按剩余条数报错;demo mock 的两处上限一并移除
- 单条规则仍限 1024 字符;请求正文 2 MiB(maxCompanyMutationBodyBytes)保留
作兜底,约合四五万条规则
测试:原先断言「超容量被拒」的两个用例翻转为「超过旧上限也能写入」——
db 侧批量写 300 条 + 追加 1 条,server 侧一次创建带 300 条范围的企业。
新用例先注册清理再断言,避免断言失败把企业留在共享开发库里。
2026-08-31 11:22:34 -04:00
Autumn-27
48e14e8cf2
fix(findings): 补齐「按资产」视图的 mock,修两处标签重复
...
demo 模式(NEXT_PUBLIC_MOCK=1)下资产树接口没有实现,点开是空白。
- mock findings 关联到 fixture 里已有的资产:一条挂两个资产(验证父节点不重复
计数)、一条不挂(演示「未关联资产」桶)
- mock handler 实现 asset-tree,并在平铺/分组两个列表分支接上 asset_scope。
父子优先级、祖先补齐、去重计数、企业层出现条件都与 db/finding_assets.go
一致;顺带把三处重复的筛选链抽成 mockFilterFindings
- 没有 URL 的服务(SMB、非 HTTP 端口)标签回退成裸 IP,与宿主那行显示得一模
一样 —— 后端与 mock 都改为补端口(10.10.10.20:8080)
- 接口挂在 host:port 形式的服务下时没触发简写,仍显示完整 URL。宿主判断统一
成解析后的 host,现在显示 /script
跑 mock handler 实测:17 个节点逐个对账「树上 total == 该节点子树查出的条数」,
无不一致。
2026-08-31 11:10:47 -04:00
Autumn-27
23cfb9ed4e
feat(findings): 发现页新增「按资产」视图
...
左侧资产树 + 右侧该子树下的发现,与另外两个视图共用同一张表和同一批筛选。
后端
- db/finding_assets.go:按当前筛选构建资产树。只收有发现的资产,祖先链逐层
补齐(endpoint→service→subdomain/ip→root_domain),父子优先级与
BuildCoverageGraph 同源;计数沿祖先链去重累加,一条发现挂多个资产不会让
父节点重复计数
- FindingFilter 加 AssetScope:选中节点=选中整棵子树,解析成资产 id 集合后
下推 SQL,列表 / 分组 / 导出三个入口共用,导出「当前筛选」自动带上
- 「未关联资产」同时收 asset_ids 为空与指向已删资产的发现,与树上桶的口径
一致(只判空数组会让桶上的数字大于点开后的条数)
- findingFilterFromQuery 统一四处的筛选解析;新增 GIN 索引
idx_findings_asset_ids,按资产反查发现不再全表扫
前端
- 树默认展开一层,支持过滤(匹配项自动展开)、面包屑下钻、手动刷新
- 每层只显示相对上一层的增量:子域名去根域名后缀、服务显示 `https :443`、
接口只留路径。完整值在 title 与面包屑,搜索仍按完整值匹配
- 不轮询:进入视图 / 改筛选 / 页内改动发现 / 点刷新时才查
- 节点超上限时整层丢弃接口/服务并提示,计数已在上层不会丢
2026-08-31 10:58:32 -04:00
Autumn-27
796dbf5600
docs(readme): 增加微信公众号交流群二维码
2026-08-31 09:59:23 -04:00
Autumn-27
5fa2ff0b46
feat(findings): 发现页新增平铺大表视图并设为默认
...
分组视图要逐个任务展开才看得到漏洞,跨任务扫列表时反而绕路。新增
「全部发现」平铺视图作为默认视图,与「按任务分组」通过页头 Tab 切换。
- 表格主体抽成 FindingsTable,两个视图共用同一份行渲染,勾选/行内展开/
行内改名与改状态/深入/删除的行为完全一致
- 平铺视图走 findingsPage(后端本就支持不带 task_id 的跨任务分页),
页码与每页条数独立 state,筛选变更即重置回第一页
- 两视图共用统计卡片与筛选条,当前视图随筛选项一起持久化到 localStorage
- 轮询只打当前视图;行内改动同步写两边缓存,切换视图不会看到过期数据
- 首个请求推迟到偏好水合之后,避免按默认视图白拉一次
2026-08-31 09:59:15 -04:00
Autumn-27
3ddb0cb808
feat(llm): 连接测试打印网关原始响应(状态码+响应体)
...
点击后台「测试」时,把每次 HTTP 尝试的状态码与原始 wire body 打进
服务端日志,便于诊断 401/额度文案/空帧/返回 HTML 页面等情况——不再
只看到 UI 折叠后的 ok/err。
- llmrec.Capture 新增 Attempts(),按次返回 {状态码, 响应体}
- TestConnection 自建 Capture 挂到 ctx(不依赖 LLM 记录开关),
经 quotaAwareTransport 填充后由 logTestConnection 输出,body 裁到 4K
2026-08-31 09:45:01 -04:00
Autumn-27
a2f7ac9747
feat(llm): 任务 LLM 配置链改为任何状态都可修改
...
任务结束(done/failed/timeout)后主 Agent 对话仍走任务配置链,链上模型出问题时
既不能改配置链、也就没法继续交互。去掉 HTTP 与 DB 事务两处终态拦截,前端弹窗
对终态任务同样开放编辑与保存(顺带修掉 queued 状态也不能编辑的口子)。
终态任务保存时不再重开额度阻塞意图:那些意图会从 blocked 挪到 open,既没有
worker 执行、也不再满足「重跑意图」的可重跑条件,反而变成死状态。终态任务想
继续跑仍走重跑意图/新增目标,由它们把任务重新 admit 回运行态。
2026-08-31 09:26:33 -04:00
Autumn
db4f97ee95
Merge pull request #85 from neouks/main
...
支持 Worker 对话实时调整执行方向
2026-08-31 21:08:28 +08:00
Autumn-27
c9bf534818
重构 worker 对话:复用 resume 机制,改专属 goroutine 运行
...
把「给运行中 Worker 发消息调方向」从自建的介入持久化协议,改为复用
已有的暂停/恢复 + transcript resume 能力,实现与主 Agent chat 一致。
- 拆 runWorkerStep:抽出 runIntent(执行+善后),池子与消息路径共用一份
善后逻辑;新增 runDetachedIntent,把意图 paused→running(不经 frontier)
并在专属 goroutine 里直接跑,用户消息不受 3 槽池限制、随发随跑。
- 精简 sendWorkerMessage handler:校验 + emit 用户活动 + 专属运行;消息经
ExecuteWithMessage 作为下一轮输入注入,request_id 仅做 transcript 去重。
- 删除介入 DB 协议与 15 处 activity 查询过滤(回退 exploration.go)、
directedClaims 调度屏障、RecoverWorkerMessages 恢复、workerWake/waitWorker、
AbortWorkIntervenedByUser。无 DB schema 改动。
- 前端:保留消息框,恢复「直接继续」(resume)按钮;发送改由 SSE 承载,
去掉乐观插入。
- 取舍(低频可接受):消息仅存内存,不做崩溃恢复;发消息时该任务可能瞬时
超并发 1 个 worker。
净改动 9 文件 +583/-46(原 PR 15 文件 +1940/-72)。
2026-08-31 09:00:21 -04:00
pphua
ff493ae42b
merge: consolidate worker conversations on main
2026-08-29 22:18:47 +08:00
pphua
76210b9933
revert: remove cross-agent worker direction synchronization
2026-08-29 22:05:28 +08:00
pphua
7e633b2056
fix: sync worker directions across agents
2026-08-29 21:55:28 +08:00
pphua
cb706d3c8c
新增worker直接对话
2026-08-29 21:55:27 +08:00
pphua
4157fa248b
新增worker直接对话
2026-08-29 21:35:15 +08:00
Autumn
98d30b28de
Merge pull request #83 from Autumn-27/fix/mobile-session-transcript-height
...
fix(web): 手机端会话详情折叠会话列表,避免会话记录被挤压看不全
2026-08-29 21:30:55 +08:00
Autumn-27
5f0d91bbb3
fix(web): 手机端会话详情折叠会话列表,避免会话记录被挤压看不全
...
小屏下会话列表固定占 10~15rem,会话记录只剩标题和输入框。改为 <lg
默认折叠列表(标题栏显示当前会话名+其它会话未读合计,点开选完自动
收起),并把高度预留从 13rem 收到 10rem。桌面端两栏布局不受影响。
2026-08-29 09:08:10 -04:00
Autumn
7ab0c214c9
Merge pull request #82 from Autumn-27/demo/enrich-planner-mock
...
feat(demo): 丰富 Vercel mock 里的 planner 规划过程
2026-08-29 15:06:25 +08:00
Autumn-27
9534e5e8a8
feat(demo): enrich planner rounds in the Vercel mock dataset
...
The demo's Plan session showed one line per round with no visible
reasoning, no cross-reference to worker output, and no intent-generation
tool calls, so it looked hollow and unrealistic.
Rebuild all five planner rounds as the full decision chain a real
planner emits: read the situation, pull the relevant worker facts for
detail (node_detail / list_findings), judge goals with prove_goal
(including the quantified-acceptance check that refuses to mark g2 met on
a foothold alone), and derive new directions through add_intent with
asset_ids / parent_ids / priority whose results reference the intent ids
already in the graph. Reasoning now cites the worker facts (fa1–fa10) by
id, so the plan is tied to what the workers actually found.
Also renumber the planner activity seq into a single monotonic range so
the rounds render in chronological order; previously round 4 (seq 4–5)
sorted ahead of rounds 1–3 (seq 300+).
Only the mock dataset changes; this affects the NEXT_PUBLIC_MOCK demo
build only, no backend behaviour.
2026-08-29 02:19:48 -04:00
Autumn
6d4408276c
Merge pull request #79 from neouks/codex/sync-v0.3.6
...
feat: 增加任务冷归档与大任务性能优化
2026-08-29 13:52:05 +08:00
Autumn-27
21656cc2e3
fix: restore changes dropped by the upstream sync merge
...
The manual v0.3.6 sync (22132a4 ) was incomplete, and the follow-up merge
(d803ae2 ) resolved conflicts in favour of that copy, silently reverting three
shipped changes. main is already an ancestor of this branch, so re-merging
cannot bring them back; restore them explicitly.
- schema.sql: re-add the idempotent llm_profiles_format_check migration.
CREATE TABLE IF NOT EXISTS leaves an existing table alone, so databases
created before openai-responses kept the old two-value CHECK and rejected
every openai-responses profile.
- orchestration.go: re-add the reseedPlannerPrompt/reseedWorkerPrompt calls,
dropped by a comment-alignment hunk while the functions stayed behind as
dead code. Without them existing installs never receive the quantified
acceptance check or the negative-conclusion evidence threshold.
- CHANGELOG.md: restore the 0.3.6 entries, the @neouks credit and the correct
norma version range.
Also close three recovery gaps in the new cold-archive path:
- traffic: write the staging journal even when no legacy host directory
exists. Modern installs keep traffic in SQLite only, so a crash between the
PostgreSQL commit and the SQLite commit left the archived task's exclusive
traffic in the hot store with nothing for recovery to act on.
- recoverTaskArchiveStages: treat a missing journal.json as a discardable
directory instead of an error, which used to set recoveryFailed and stop the
archive worker from starting for the rest of the process lifetime.
- stageTaskArchiveFiles: replay the journal's renames when resuming an
existing staging root. The journal is written before the first rename, so
its presence did not guarantee a complete payload, and a resumed round could
package an archive missing transcripts or workspace files.
2026-08-29 01:37:46 -04:00
pphua
0ec45bb45d
fix: prevent OOM when archiving large tasks
2026-08-28 15:25:20 +08:00
pphua
01c6d73614
修复归档大型任务导致的崩溃
2026-08-28 15:20:52 +08:00
pphua
1fcc4b0588
fix: stream large task archive snapshots
2026-08-28 14:16:00 +08:00
pphua
d803ae2b11
merge: sync official main into PR branch
2026-08-28 14:14:41 +08:00
pphua
22132a4d21
chore: sync upstream v0.3.6 changes
2026-08-28 14:03:07 +08:00
pphua
9da521ee4e
归档
2026-08-28 12:56:29 +08:00
begininvoke
b9773dc6e1
fix(security): fix(deps): 2 vulnerable dependencies in go.mod
2026-08-27 17:10:02 -07:00
pphua
594436fddd
修复BUG: 1、当存在较多任务时,系统会发生卡顿,加载对话或者加载界面时候存在明显卡顿,优化性能找出问题
2026-08-28 08:00:36 +08:00
pphua
cf0989c67d
修复
...
1、修复流量包里的复制按钮不工作问题
2、修复新建任务关联资产不同步到任务测试范围问题
2026-08-28 07:37:24 +08:00
Autumn
f3cfbafa8f
Merge pull request #75 from Autumn-27/docs/release-0.3.6
...
docs(changelog): 发布 0.3.6
2026-08-28 00:36:46 +08:00
Autumn-27
051ca84a20
docs(changelog): 发布 0.3.6
2026-08-27 12:34:51 -04:00
Autumn
88bca9783f
Merge pull request #74 from Autumn-27/feat/list-facts-paging
...
feat(agent): list_facts 改为分页+关键词过滤,避免上下文膨胀
2026-08-28 00:17:06 +08:00
Autumn-27
10f6a4fbc7
feat(agent): list_facts 改为分页+关键词过滤,避免上下文膨胀
...
fact 多时旧的 list_facts 一次返回每任务至多 500 条且 summary 不截断,
一次调用就可能撑爆上下文。改为分页(默认 20,最新在前)+ q 关键词过滤,
返回 {facts, total, has_more, next_before},summary 超长按 rune 截断。
- db: listByKindPageFiltered/countByKindFiltered(payload->>'summary' ILIKE)
+ ListByKindPageWithSources 跨本任务/继承任务合并分页
- agent: list_facts 加 limit/before/q 参数,compactFact 截断 summary;
worker/planner 提示词同步说明分页语义
- server: 旧库一次性迁移把 list_facts 新 schema 刷进 tools 目录表
(SeedTool 首插入only,否则工具管理页显示「无参数」);flag bump 到 v7
2026-08-27 12:15:02 -04:00
Autumn
6b6b56e0a7
Merge pull request #73 from Autumn-27/fix/llm-test-verify-reply
...
fix(llm): 测试连接校验模型确有回复,并按配置的收发模式测
2026-08-27 23:16:52 +08:00
Autumn-27
7b1f7e141b
fix(llm): 测试连接校验模型确有回复,并按配置的收发模式测
...
测试连接此前只判 err:请求通了但模型一个字不吐(思考烧光预算、正文被
安全策略吞掉、兼容层丢 content)照样报成功,而这种配置在会话里就是不
回话——正是「测试成功、对话不成功」的来源。
- TestConnection 返回回复文本,空回复直接判失败
- 回复回传前端,成功 toast 里展示,测试通过有据可查
- 测试连接改用该配置真实的收发模式:此前恒走流式(ConfigFrom 默认
Stream=true),选了非流式的配置测的是另一条通道;请求省略 streaming
时仍默认流式,老客户端不受影响
Closes #65
2026-08-27 11:14:48 -04:00
Autumn
68a221eda1
Merge pull request #72 from Autumn-27/feat/tool-call-stats
...
feat(commands): 工具执行页新增调用次数统计
2026-08-27 22:58:02 +08:00
Autumn-27
e10f8413dc
feat(commands): 工具执行页新增调用次数统计
...
「工具执行」页工具栏加「统计」按钮,弹窗按工具展示调用次数、占比与
失败次数,按次数降序。统计沿用列表的 task/q 筛选,算的是整个结果集
而非当前页;弹窗打开时才请求,翻页不会多付一次聚合查询。
- db: 抽出 commandFilter,列表与统计共用同一份 WHERE;新增 ToolStats
- server: GET /api/commands/stats
- web: 统计弹窗 + demo 模式 mock
2026-08-27 10:56:11 -04:00
Autumn
a380eb4195
Merge pull request #71 from Autumn-27/fix/llm-profile-streaming-dto
...
fix(llm): 配置列表返回 streaming 字段
2026-08-27 22:39:55 +08:00
Autumn-27
8be7631eb3
fix(llm): 配置列表返回 streaming 字段
...
LLMProfileDTO 漏了 streaming,接口从不返回该字段,前端读到 undefined
后一律回落成默认的流式,导致「非流式」保存成功但重新打开开关仍是开的。
字段不加 omitempty:false 必须出现在响应里。
Closes #69
2026-08-27 10:37:53 -04:00
Autumn
529f34007c
Merge pull request #70 from Autumn-27/chore/bump-norma-v0.3.2
...
chore(deps): 升级 norma v0.3.1 → v0.3.2
2026-08-27 22:10:26 +08:00
Autumn-27
f891f4ffb8
chore(deps): 升级 norma v0.3.1 → v0.3.2
...
带入本轮 norma 修复:
- OpenAI 系响应里被静默丢弃的 reasoning/refusal,Responses 补 reasoning_text
- reasoning 字段三名去重
- 空响应(零内容块)有界重试
- 压缩边界切断工具配对导致的网关 400(同时修复已烤进 transcript 的存量孤儿)
2026-08-27 10:00:04 -04:00
Autumn-27
f6c4cbb013
docs(changelog): 补全 0.3.5 遗漏条目
...
补上 v0.3.4 以来已合入但未记录的变更:LLM 流式/非流式切换、
OpenAI Responses API 格式、LLM 请求/响应原文录制、会话列表多选模式、
以及 #57 的任务/会话/流量体验增强;0.3.5 贡献者补记 @neouks。
2026-08-25 12:27:38 -04:00
Autumn-27
48f260fdde
docs(changelog): 发布 0.3.5
2026-08-25 12:22:06 -04:00
Autumn-27
99ac96da2f
feat(agent): 优化 planner/worker 提示词并加量化验收核对
...
- planner 判目标新增「量化验收核对」:覆盖度/flag 数/权限等可量化目标
未达标时禁止 prove_goal,修复覆盖度要求 100%、实测 40% 却被判完成
- 重写 planner「0 意图」判定:仅在「方向已被现有意图覆盖」或「下一步
依赖在跑 work 的产出」两种情况才 0 意图,避免目标未达成时过早收手
- 强化 worker 否定结论证据门槛:未穷尽手段/证据弱一律标 inferred,
避免轻率的 observed 否定把整条路线焊死
- 加 reseedPlannerPrompt / reseedWorkerPrompt 一次性迁移,旧库追加新
默认版本并切换,旧版保留在历史可恢复
2026-08-25 12:19:04 -04:00
Autumn-27
a9304d5a4f
feat(chat): 会话列表多选改为「多选」模式开关
...
默认列表不再常驻每行勾选框(观感更干净),表头改为「共 N 个 + 多选」按钮。
点「多选」进入选择模式:显示每行勾选框、全选、批量删除,「完成」退出并清空
选择;批量删除全部成功后自动退出(有失败则留在选择模式便于重试)。单条的
重命名/置顶/删除仍走每行的 ⋯ 菜单。
2026-08-25 12:08:18 -04:00
Autumn-27
12541a6dec
feat(llm): 支持 OpenAI Responses API 格式的 LLM 配置
...
依赖升级到 norma v0.3.1(新增 FormatOpenAIResponses + reasoning_content 回传
修复)。每个 LLM profile 现在可选第三种格式 openai-responses,打
POST /v1/responses,与 Chat Completions / Anthropic 并列。
- agent.Config:ConfigFrom / FromEnv / Provider() 支持 openai-responses
(BaseURL 归一化去 /responses 尾巴,默认 model gpt-5)
- server:saveLLMConfig 放开二元 format 归一;模型列表端点复用 OpenAI
/models(Responses 模型列表仍在 /v1/models)
- db: llm_profiles 的 format CHECK 约束加入 openai-responses,并幂等迁移
(DROP + ADD CONSTRAINT)补旧库
- web: 格式下拉新增「OpenAI (Responses API)」,类型与回显同步
流式/非流式两条路都走新 adapter;输出、token 统计、操作统计、LLM 录制
四条链路复用中性层,无需改动。
2026-08-25 11:39:24 -04:00
Autumn-27
587ba422b4
feat(llm): 每个 LLM 配置支持流式/非流式切换(默认流式)
...
依赖 norma v0.3.0 的 Provider.Complete。为每个 llm_profile 增加 streaming
开关:开(默认)走流式 SSE;关走真·非流式(stream:false、一次性返回完整
JSON),可绕开部分网关糟糕的 SSE 实现(空帧、思考字段丢帧),代价是失去
运行中的实时进度与实时 token 计数。
- agent.Config.Stream → agentcore.Options.NonStreaming = !Stream;worker /
planner / mainagent / chat / goals 经 SetNonStreaming resolver 注入,任务
路由按当前激活 profile 动态取值
- llmpool.Pool / llmrec.Recorder / taskLLMRuntime 三个 Provider 包装均实现
Complete(分别带故障转移 / 录制 / 同 provider 重试与额度 failover),使
输出、token 统计、操作统计、LLM 录制四条链路在非流式下保持兼容
- db: llm_profiles 新增 streaming 列 + ALTER 补旧库(默认 true,旧配置无感)
- 系统 → LLM 配置表单增加「流式输出」开关
2026-08-25 10:49:47 -04:00
Autumn-27
19a7206d12
feat(llmrec): 录制 LLM 请求/响应 HTTP 原文
...
归一化视图(request_body/response_body)会丢弃工具 schema、tool_use 块,
且看不到原始 SSE 帧,排查 provider 侧问题时信息不足。新增在 HTTP transport
层捕获真实 wire body 的能力:
- llmrec: 新增 Capture,Recorder 挂到 ctx,quotaAwareTransport 填充。
请求取 GetBody 副本(不消费原 body),响应用 tee 保持流式;norma 内部重试
的多次尝试逐次保留(旧代码会读掉丢弃),单次时为字节级原文。
- db: llm_records 增加 raw_request/raw_response 两列,含旧库 ALTER 迁移。
- web: 录制页详情面板增加「原文」视图切换,及请求/响应内容复制按钮
(兼容非安全上下文的 execCommand 回退)。
- 测试: 单元(capture)、端到端(逐字节比对捕获=服务器实际收到)、
迁移(真实 PG 事务回滚)、全链路(Recorder→provider→PG 落库)。
2026-08-25 09:40:05 -04:00