@devflow-tools/devflow 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +58 -56
- package/dist/hooks/hook-client.js +6 -6
- package/dist/hooks/hook-daemon.js +6 -6
- package/dist/hooks/post-tool-use.js +3 -3
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/session-end.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +2 -2
- package/dist/plugin/dist/hooks/hook-client.js +6 -6
- package/dist/plugin/dist/hooks/hook-daemon.js +6 -6
- package/dist/plugin/dist/hooks/post-tool-use.js +3 -3
- package/dist/plugin/dist/hooks/pre-tool-use.js +2 -2
- package/dist/plugin/dist/hooks/session-end.js +2 -2
- package/dist/plugin/hooks/session-start +37 -7
- package/dist/plugin/package.json +7 -7
- package/dist/scripts/audit-session-data.js +6 -0
- package/package.json +14 -13
- package/dist/dashboard/404.html +0 -1
- package/dist/dashboard/_next/static/ZaapgyqOj6AXHY5zdw6_X/_buildManifest.js +0 -1
- package/dist/dashboard/_next/static/ZaapgyqOj6AXHY5zdw6_X/_ssgManifest.js +0 -1
- package/dist/dashboard/_next/static/chunks/1dd3208c-f3e84932bdc53383.js +0 -1
- package/dist/dashboard/_next/static/chunks/221-893fab1a7d7d9317.js +0 -1
- package/dist/dashboard/_next/static/chunks/249-e04c1de6240fd78a.js +0 -1
- package/dist/dashboard/_next/static/chunks/343-09a7e255220705c5.js +0 -1
- package/dist/dashboard/_next/static/chunks/384-484184f146e1b764.js +0 -1
- package/dist/dashboard/_next/static/chunks/402-a2e4eb98bb6a524c.js +0 -1
- package/dist/dashboard/_next/static/chunks/429-3a8e078af4ea04bd.js +0 -1
- package/dist/dashboard/_next/static/chunks/458-75822399a849befa.js +0 -1
- package/dist/dashboard/_next/static/chunks/528-7d4fc14903647f1e.js +0 -2
- package/dist/dashboard/_next/static/chunks/568-50487ea5e93fe11f.js +0 -1
- package/dist/dashboard/_next/static/chunks/697-05cf55b6c667773f.js +0 -1
- package/dist/dashboard/_next/static/chunks/6b3bb038-34d5cf36bd0210d6.js +0 -1
- package/dist/dashboard/_next/static/chunks/806-195d4d5cc6c28f6c.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/_not-found/page-5252c260804ee1ce.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/accuracy/page-3b8b7448c9c7aeee.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/benchmark/page-d8f3f089f1d15cc7.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/context/page-480f7324dee9cf74.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/doctor/page-c32c81c69968099f.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/executions/page-bee250062acc03a8.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/graph/page-75947209e5b7741c.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/knowledge/page-61a2d663940fb04b.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/layout-572650e435947896.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/memory/page-71d7c8926179b065.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/page-10dcf844701d7903.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/replay/page-f354eb8ed0bfbb11.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-ffc0fda72263722c.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/runs/page-4da6997bddcfeb45.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/settings/page-0fa1d3b02152a97c.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/timeline/page-b676878a19561da3.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-6452423bc1f543ec.js +0 -1
- package/dist/dashboard/_next/static/chunks/app/workflows/page-0ff0044616ac56aa.js +0 -1
- package/dist/dashboard/_next/static/chunks/framework-58c3457e28c4602f.js +0 -1
- package/dist/dashboard/_next/static/chunks/main-3175faffdbfc3051.js +0 -1
- package/dist/dashboard/_next/static/chunks/main-app-cf693a9b955f073e.js +0 -1
- package/dist/dashboard/_next/static/chunks/pages/_app-58c3f1a8a070bd35.js +0 -1
- package/dist/dashboard/_next/static/chunks/pages/_error-312a564ec7e2663f.js +0 -1
- package/dist/dashboard/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/dist/dashboard/_next/static/chunks/webpack-d6388c5dcd85b0c5.js +0 -1
- package/dist/dashboard/_next/static/css/322e14d06135256b.css +0 -31
- package/dist/dashboard/_next/static/css/7d4d1db5aa137b5a.css +0 -3
- package/dist/dashboard/accuracy.html +0 -1
- package/dist/dashboard/accuracy.txt +0 -7
- package/dist/dashboard/benchmark.html +0 -1
- package/dist/dashboard/benchmark.txt +0 -7
- package/dist/dashboard/context.html +0 -1
- package/dist/dashboard/context.txt +0 -7
- package/dist/dashboard/doctor.html +0 -1
- package/dist/dashboard/doctor.txt +0 -7
- package/dist/dashboard/executions.html +0 -1
- package/dist/dashboard/executions.txt +0 -7
- package/dist/dashboard/graph.html +0 -1
- package/dist/dashboard/graph.txt +0 -7
- package/dist/dashboard/index.html +0 -1
- package/dist/dashboard/index.txt +0 -7
- package/dist/dashboard/knowledge.html +0 -1
- package/dist/dashboard/knowledge.txt +0 -7
- package/dist/dashboard/locales/en.json +0 -335
- package/dist/dashboard/locales/zh.json +0 -335
- package/dist/dashboard/memory.html +0 -1
- package/dist/dashboard/memory.txt +0 -7
- package/dist/dashboard/replay.html +0 -1
- package/dist/dashboard/replay.txt +0 -7
- package/dist/dashboard/runs/_.html +0 -1
- package/dist/dashboard/runs/_.txt +0 -8
- package/dist/dashboard/runs.html +0 -1
- package/dist/dashboard/runs.txt +0 -7
- package/dist/dashboard/settings.html +0 -1
- package/dist/dashboard/settings.txt +0 -7
- package/dist/dashboard/timeline.html +0 -1
- package/dist/dashboard/timeline.txt +0 -7
- package/dist/dashboard/tool-metrics.html +0 -1
- package/dist/dashboard/tool-metrics.txt +0 -7
- package/dist/dashboard/workflows.html +0 -1
- package/dist/dashboard/workflows.txt +0 -7
|
@@ -16,13 +16,43 @@ elif command -v npx &>/dev/null; then
|
|
|
16
16
|
fi
|
|
17
17
|
|
|
18
18
|
if [ -n "$DOCTOR_OUTPUT" ] && echo "$DOCTOR_OUTPUT" | python3 -c "import sys,json; json.load(sys.stdin)" 2>/dev/null; then
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
SUMMARY=$(
|
|
20
|
+
DEVFLOW_DOCTOR_OUTPUT="$DOCTOR_OUTPUT" python3 - 2>/dev/null <<'PY'
|
|
21
|
+
import json, os
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
d = json.loads(os.environ.get('DEVFLOW_DOCTOR_OUTPUT', '{}'))
|
|
25
|
+
metrics = {}
|
|
26
|
+
red_sections = []
|
|
27
|
+
for section in d.get('sections', []):
|
|
28
|
+
if section.get('status') == 'red':
|
|
29
|
+
red_sections.append(str(section.get('name', '')).strip())
|
|
30
|
+
for metric in section.get('metrics', []):
|
|
31
|
+
key = metric.get('key')
|
|
32
|
+
if key:
|
|
33
|
+
metrics[key] = metric.get('value')
|
|
34
|
+
|
|
35
|
+
# One-release compatibility with the previous top-level doctor schema.
|
|
36
|
+
legacy_project = d.get('project', {}) if isinstance(d.get('project'), dict) else {}
|
|
37
|
+
project_root = metrics.get('canonical_project') or legacy_project.get('rootPath') or ''
|
|
38
|
+
project_name = legacy_project.get('name') or d.get('projectName') or (Path(project_root).name if project_root else '')
|
|
39
|
+
parts = ['DevFlow 已就绪']
|
|
40
|
+
if project_name:
|
|
41
|
+
parts.append(f'项目 {project_name}')
|
|
42
|
+
nodes = metrics.get('codegraph_nodes')
|
|
43
|
+
if isinstance(nodes, (int, float)):
|
|
44
|
+
parts.append(f'代码图 {int(nodes)} 个节点')
|
|
45
|
+
plugin_source = metrics.get('active_skill_source')
|
|
46
|
+
if isinstance(plugin_source, str) and plugin_source:
|
|
47
|
+
parts.append(f'技能来源 {plugin_source}')
|
|
48
|
+
if red_sections:
|
|
49
|
+
parts.append('需处理 ' + ', '.join(x for x in red_sections if x))
|
|
50
|
+
print('。'.join(parts) + '。使用 /devflow:context 查代码,/devflow:react 获取 React 专家能力。')
|
|
51
|
+
PY
|
|
52
|
+
) || SUMMARY=""
|
|
53
|
+
if [ -z "$SUMMARY" ]; then
|
|
54
|
+
SUMMARY="DevFlow 插件已加载。Doctor 状态暂不可用,运行 devflow doctor 查看详情。"
|
|
55
|
+
fi
|
|
26
56
|
else
|
|
27
57
|
SUMMARY="DevFlow 插件已加载。如尚未初始化项目,请运行 devflow init。使用 /devflow 查看可用命令。"
|
|
28
58
|
fi
|
package/dist/plugin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/claude-code-plugin",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "DevFlow — Developer Intelligence Platform for Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
"deploy": "npx tsx scripts/inject-gates.ts --deploy"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@devflow-tools/database": "0.16.
|
|
12
|
-
"@devflow-tools/memory-engine": "0.16.
|
|
13
|
-
"@devflow-tools/sdk": "0.16.
|
|
14
|
-
"@devflow-tools/telemetry": "0.16.
|
|
15
|
-
"@devflow-tools/workflow-engine": "0.16.
|
|
11
|
+
"@devflow-tools/database": "0.16.3",
|
|
12
|
+
"@devflow-tools/memory-engine": "0.16.3",
|
|
13
|
+
"@devflow-tools/sdk": "0.16.3",
|
|
14
|
+
"@devflow-tools/telemetry": "0.16.3",
|
|
15
|
+
"@devflow-tools/workflow-engine": "0.16.3"
|
|
16
16
|
},
|
|
17
17
|
"allowScripts": {
|
|
18
18
|
"better-sqlite3@12.11.1": true,
|
|
19
19
|
"sharp@0.32.6": true
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@devflow-tools/mcp-server": "0.16.
|
|
22
|
+
"@devflow-tools/mcp-server": "0.16.3"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"pi-package",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import {execFileSync}from'node:child_process';import {createRequire}from'node:module';import {existsSync,readdirSync,readFileSync}from'node:fs';import {homedir}from'node:os';import {join}from'node:path';var L=6e4,R;function P(){if(R)return R;let e=createRequire(import.meta.url)("node:sqlite");if(typeof e.DatabaseSync!="function")throw new Error("audit-session-data requires Node.js with node:sqlite (Node.js >=22.13.0)");return R=e.DatabaseSync,R}function V(e){let t,n,o=false;for(let i=0;i<e.length;i+=1){let l=e[i];if(l==="--json")o=true;else if(l==="--project")t=e[++i];else if(l==="--session")n=e[++i];else throw new Error(`Unknown argument: ${l}`)}if(!t)throw new Error("--project is required");if(!n)throw new Error("--session is required");return {project:t,session:n,json:o}}function u(e){return typeof e=="string"&&e.length>0?e:null}function j(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function h(e){return e===true||e===1}function d(e,t){return !!e.prepare("SELECT 1 FROM sqlite_master WHERE type IN ('table', 'view') AND name = ?").get(t)}function E(e,t,n){return d(e,t)?e.prepare(`PRAGMA table_info(${t})`).all().some(o=>o.name===n):false}function k(e,t,n=[]){let o=e.prepare(t).get(...n);return Number(o?.count??0)}function A(e){if(typeof e!="string"||e.length===0)return e??null;try{return JSON.parse(e)}catch{return e}}function w(e){return e===null||typeof e!="object"?JSON.stringify(e)??String(e):Array.isArray(e)?`[${e.map(w).join(",")}]`:`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${w(n)}`).join(",")}}`}function F(e){return w({tool:e.tool,command:e.command,kind:e.kind,input:e.input})}function _(e){let t=new Map;for(let n of e){if(n.toolUseId){let l=`tool_use_id:${n.toolUseId}`,a=t.get(l)??{reason:"canonical_tool_use_id",events:[]};a.events.push(n),t.set(l,a);continue}let o=`payload:${F(n)}`,i=t.get(o)??{reason:"normalized_payload",events:[]};i.events.push(n),t.set(o,i);}return [...t.entries()].map(([n,o])=>{let i=o.events.map(a=>a.timestamp).filter(a=>a!==null),l=i.length>1?Math.max(...i)-Math.min(...i):null;return {key:n,reason:o.reason,count:o.events.length,eventIds:o.events.map(a=>a.id),timeSpanMs:l,tool:o.events[0]?.tool??null}}).filter(n=>n.count>1&&(n.reason==="canonical_tool_use_id"||n.timeSpanMs===null||n.timeSpanMs<=L)).sort((n,o)=>o.count-n.count||n.key.localeCompare(o.key))}function O(e){return existsSync(e)?new(P())(e,{readOnly:true,timeout:1e3}):null}function I(e,t){if(!existsSync(e))return {path:e,exists:false,sessions:[],executions:[],events:[],duplicateCandidates:[]};let n=null;try{if(n=O(e),!n)return {path:e,exists:!1,sessions:[],executions:[],events:[],duplicateCandidates:[]};let o=d(n,"sessions")?n.prepare("SELECT * FROM sessions WHERE id = ?").all(t):[],i=E(n,"skill_executions","session_id"),l=d(n,"skill_executions")?n.prepare(i?"SELECT * FROM skill_executions WHERE session_id = ? OR execution_id = ? ORDER BY started_at":"SELECT * FROM skill_executions WHERE execution_id = ? ORDER BY started_at").all(...i?[t,t]:[t]):[],a=l.map(s=>u(s.execution_id)).filter(s=>s!==null),m=E(n,"tool_call_events","tool_use_id"),c=E(n,"tool_call_events","session_id"),b=E(n,"tool_call_events","kind"),C=a.length>0?`execution_id IN (${a.map(()=>"?").join(",")})`:"execution_id = ?",y=a.length>0?a:[t],r=(d(n,"tool_call_events")?n.prepare(`SELECT * FROM tool_call_events WHERE ${c?"session_id = ? OR ":""}${C} ORDER BY timestamp`).all(...c?[t,...y]:y):[]).map(s=>({id:u(s.event_id)??"unknown",sessionId:u(s.session_id),executionId:u(s.execution_id),timestamp:j(s.timestamp),tool:u(s.tool_name),toolType:u(s.tool_type),toolUseId:m?u(s.tool_use_id):null,input:A(s.input),command:null,kind:b?u(s.kind):null,fallback:h(s.mcp_fallback),blocked:h(s.blocked),processed:!1}));return {path:e,exists:!0,sessions:o,executions:l,events:r,duplicateCandidates:_(r)}}catch(o){return {path:e,exists:true,sessions:[],executions:[],events:[],duplicateCandidates:[],error:o instanceof Error?o.message:String(o)}}finally{n?.close();}}function N(e,t){let n=join(e,".devflow","memory","memories.db"),o={databasePath:n,session:null,eventCount:0,processedEventCount:0,pendingEventCount:0,eventsByTool:[],duplicateCandidates:[],projectObservationCount:0,sessionObservationCount:0,sessionObservationVectorCount:0,projectObservationVectorCount:0,projectObservationVectorRowCount:0,pendingLeaseCount:0,activeSessionCount:0};if(!existsSync(n))return o;let i=null;try{if(i=O(n),!i)return o;let a=(d(i,"session_events")?i.prepare("SELECT * FROM session_events WHERE session_id = ? ORDER BY created_at").all(t):[]).map(r=>({id:u(r.id)??"unknown",sessionId:u(r.session_id),executionId:null,timestamp:j(r.created_at),tool:u(r.tool),toolType:null,toolUseId:null,input:A(r.payload),command:u(r.command),kind:u(r.kind),fallback:!1,blocked:!1,processed:h(r.processed)})),m=d(i,"observations")?i.prepare("SELECT id, session_id, embedding FROM observations").all():[],c=d(i,"sessions")?i.prepare("SELECT * FROM sessions WHERE id = ?").get(t)??null:null,b=new Map;for(let r of a){let s=`${r.tool??""}\0${r.kind??""}`,f=b.get(s)??{tool:r.tool,kind:r.kind,count:0};f.count+=1,b.set(s,f);}let C=d(i,"memories_vec_rowids")?new Set(i.prepare("SELECT id FROM memories_vec_rowids").all().map(r=>u(r.id)).filter(r=>r!==null)):new Set,y=m.filter(r=>r.session_id===t),v=r=>r.embedding!==null&&r.embedding!==void 0;return {databasePath:n,session:c,eventCount:a.length,processedEventCount:a.filter(r=>r.processed).length,pendingEventCount:a.filter(r=>!r.processed).length,eventsByTool:[...b.values()].sort((r,s)=>s.count-r.count),duplicateCandidates:_(a),projectObservationCount:m.length,sessionObservationCount:y.length,sessionObservationVectorCount:y.filter(v).length,projectObservationVectorCount:m.filter(v).length,projectObservationVectorRowCount:m.filter(r=>C.has(String(r.id))).length,pendingLeaseCount:d(i,"distill_leases")?k(i,"SELECT COUNT(*) AS count FROM distill_leases WHERE status = 'pending'"):0,activeSessionCount:d(i,"sessions")?k(i,"SELECT COUNT(*) AS count FROM sessions WHERE status = 'active'"):0}}catch(l){return {...o,error:l instanceof Error?l.message:String(l)}}finally{i?.close();}}function U(e){let t=join(e,".devflow","knowledge","knowledge.db"),n={databasePath:t,documentCount:0,chunkCount:0,emptyTitleCount:0,vectorRowCount:0,sourceCounts:[]};if(!existsSync(t))return n;let o=null;try{if(o=O(t),!o)return n;let i=d(o,"knowledge_docs")?k(o,"SELECT COUNT(*) AS count FROM knowledge_docs"):0,l=d(o,"knowledge_chunks")?k(o,"SELECT COUNT(*) AS count FROM knowledge_chunks"):0,a=d(o,"knowledge_docs")?k(o,"SELECT COUNT(*) AS count FROM knowledge_docs WHERE TRIM(COALESCE(title, '')) = ''"):0,m=d(o,"knowledge_docs")?o.prepare("SELECT source, COUNT(*) AS count FROM knowledge_docs GROUP BY source ORDER BY count DESC").all().map(c=>({source:u(c.source),count:Number(c.count??0)})):[];return {databasePath:t,documentCount:i,chunkCount:l,emptyTitleCount:a,vectorRowCount:d(o,"knowledge_vec_rowids")?k(o,"SELECT COUNT(*) AS count FROM knowledge_vec_rowids"):0,sourceCounts:m}}catch(i){return {...n,error:i instanceof Error?i.message:String(i)}}finally{o?.close();}}function W(){let e=join(homedir(),".claude","plugins","cache","devflow-local","devflow");if(!existsSync(e))return null;let t=readdirSync(e,{withFileTypes:true}).filter(n=>n.isDirectory()).map(n=>n.name).sort();return t.length>0?join(e,t[t.length-1]):null}function x(e){if(!e)return null;try{let t=JSON.parse(readFileSync(join(e,".claude-plugin","plugin.json"),"utf8"));return u(t.version)}catch{return null}}function q(e,t){try{return execFileSync(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()||null}catch{return null}}function B(e,t,n){let o=join(e,".devflow","logs","traces");if(!existsSync(o))return null;let i=[];for(let l of readdirSync(o,{withFileTypes:true})){if(!l.isDirectory())continue;for(let m of t){let c=join(o,l.name,`${m}.jsonl`);existsSync(c)&&i.push(c);}let a=join(o,l.name,`${n}.jsonl`);existsSync(a)&&i.push(a);}return i[0]??null}function H(e){if(!e)return null;try{return readFileSync(e,"utf8").split(`
|
|
2
|
+
`).filter(t=>t.trim().length>0).length}catch{return null}}function Y(e){try{return execFileSync("git",["-C",e,"status","--short","--branch"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return "unavailable"}}function J(e,t){let n=process.env.DEVFLOW_STATE_DIR??join(homedir(),".devflow","global"),o=[join(n,"devflow.db"),join(e,".devflow","devflow.db")],i=o.filter((s,f)=>o.indexOf(s)===f).map(s=>I(s,t)),l=i.flatMap(s=>s.events),a=[...new Set(i.flatMap(s=>s.executions).map(s=>u(s.execution_id)).filter(s=>s!==null))],m=new Map;for(let s of l)m.set(s.tool,(m.get(s.tool)??0)+1);let c=W(),b=B(e,a,t),C=N(e,t),y=U(e),v=join(homedir(),".claude","skills","devflow:react","SKILL.md"),r=i.find(s=>s.executions.length>0)??i.find(s=>s.sessions.length>0);return {schemaVersion:1,readOnly:true,generatedAt:new Date().toISOString(),project:{root:e,gitStatus:Y(e)},query:{sessionId:t,executionIds:a},runtime:{nodeVersion:process.version,claudeVersion:q("claude",["--version"]),devflowVersion:x(c),activePluginPath:c,activePluginVersion:x(c),activeReactSkillPath:c?join(c,"skills","react","SKILL.md"):null,activeReactSkillExists:c?existsSync(join(c,"skills","react","SKILL.md")):false,legacyReactSkillPath:v,legacyReactSkillExists:existsSync(v),tracePath:b,traceEventCount:H(b)},telemetry:{databases:i,eventCount:l.length,mcpEventCount:l.filter(s=>s.toolType==="mcp").length,fallbackCount:l.filter(s=>s.fallback).length,blockedCount:l.filter(s=>s.blocked).length,duplicateCandidates:_(l),byTool:[...m.entries()].map(([s,f])=>({tool:s,count:f})).sort((s,f)=>f.count-s.count||String(s.tool).localeCompare(String(f.tool)))},memory:C,knowledge:y,lifecycle:{telemetrySession:r?.sessions[0]??null,telemetryExecution:r?.executions[0]??null,memorySession:C.session}}}function K(e){let t=e.telemetry,n=e.memory,o=e.lifecycle;return [`Session audit: ${e.query.sessionId}`,`Project: ${e.project.root}`,`Git: ${e.project.gitStatus||"(clean)"}`,`Telemetry: ${t.eventCount} events (${t.mcpEventCount} MCP, ${t.fallbackCount} fallback, ${t.blockedCount} blocked)`,`Memory events: ${n.eventCount} (${n.processedEventCount} processed, ${n.pendingEventCount} pending)`,`Observations: ${n.sessionObservationCount} for session / ${n.projectObservationCount} for project; vectors ${n.sessionObservationVectorCount}/${n.sessionObservationCount} for session, ${n.projectObservationVectorCount}/${n.projectObservationCount} by blob, ${n.projectObservationVectorRowCount} indexed`,`Duplicates: ${t.duplicateCandidates.length} telemetry candidate groups, ${n.duplicateCandidates.length} Memory candidate groups`,`Lifecycle: telemetry ${u(o.telemetrySession?.status)??"missing"}, execution ${u(o.telemetryExecution?.status)??"missing"}, memory ${u(o.memorySession?.status)??"missing"}`,`Knowledge: ${e.knowledge.documentCount} docs, ${e.knowledge.chunkCount} chunks, ${e.knowledge.vectorRowCount} vectors, ${e.knowledge.emptyTitleCount} empty titles`,`Runtime: Claude ${e.runtime.claudeVersion??"unknown"}, DevFlow ${e.runtime.devflowVersion??"unknown"}, trace events ${e.runtime.traceEventCount??"unknown"}`].join(`
|
|
3
|
+
`)}function z(){try{let e=V(process.argv.slice(2)),t=J(e.project,e.session);process.stdout.write(e.json?`${JSON.stringify(t,null,2)}
|
|
4
|
+
`:`${K(t)}
|
|
5
|
+
`);}catch(e){process.stderr.write(`${e instanceof Error?e.message:String(e)}
|
|
6
|
+
`),process.exitCode=1;}}z();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/devflow",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DevFlow - Developer Intelligence Platform (Distribution Package)",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsup",
|
|
11
|
+
"audit-session-data": "tsx scripts/audit-session-data.ts",
|
|
11
12
|
"build:watch": "tsup --watch",
|
|
12
13
|
"clean": "rm -rf dist",
|
|
13
14
|
"postbuild": "cp ../../apps/server/public/fallback.html dist/fallback.html && npx tsx scripts/bundle-plugin.ts && mkdir -p ../../plugins/claude-code/dist/hooks && cp dist/hooks/*.js ../../plugins/claude-code/dist/hooks/",
|
|
@@ -15,17 +16,17 @@
|
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@colbymchenry/codegraph": "^1.1.1",
|
|
18
|
-
"@devflow-tools/adapters": "0.16.
|
|
19
|
-
"@devflow-tools/benchmark": "0.16.
|
|
20
|
-
"@devflow-tools/context-engine": "0.16.
|
|
21
|
-
"@devflow-tools/database": "0.16.
|
|
22
|
-
"@devflow-tools/knowledge-engine": "0.16.
|
|
23
|
-
"@devflow-tools/mcp-server": "0.16.
|
|
24
|
-
"@devflow-tools/memory-engine": "0.16.
|
|
25
|
-
"@devflow-tools/sdk": "0.16.
|
|
26
|
-
"@devflow-tools/server": "0.16.
|
|
27
|
-
"@devflow-tools/telemetry": "0.16.
|
|
28
|
-
"@devflow-tools/workflow-engine": "0.16.
|
|
19
|
+
"@devflow-tools/adapters": "0.16.3",
|
|
20
|
+
"@devflow-tools/benchmark": "0.16.3",
|
|
21
|
+
"@devflow-tools/context-engine": "0.16.3",
|
|
22
|
+
"@devflow-tools/database": "0.16.3",
|
|
23
|
+
"@devflow-tools/knowledge-engine": "0.16.3",
|
|
24
|
+
"@devflow-tools/mcp-server": "0.16.3",
|
|
25
|
+
"@devflow-tools/memory-engine": "0.16.3",
|
|
26
|
+
"@devflow-tools/sdk": "0.16.3",
|
|
27
|
+
"@devflow-tools/server": "0.16.3",
|
|
28
|
+
"@devflow-tools/telemetry": "0.16.3",
|
|
29
|
+
"@devflow-tools/workflow-engine": "0.16.3",
|
|
29
30
|
"@inquirer/prompts": "^7.10.1",
|
|
30
31
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
31
32
|
"@nestjs/common": "^10.4.0",
|
|
@@ -53,5 +54,5 @@
|
|
|
53
54
|
"plugin-registry.json",
|
|
54
55
|
"scripts/postinstall.js"
|
|
55
56
|
],
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "5f49cf58702ee94ad9e4ab585e58f824e8633721"
|
|
57
58
|
}
|
package/dist/dashboard/404.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/7d4d1db5aa137b5a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js"/><script src="/_next/static/chunks/1dd3208c-f3e84932bdc53383.js" async=""></script><script src="/_next/static/chunks/528-7d4fc14903647f1e.js" async=""></script><script src="/_next/static/chunks/main-app-cf693a9b955f073e.js" async=""></script><script src="/_next/static/chunks/384-484184f146e1b764.js" async=""></script><script src="/_next/static/chunks/806-195d4d5cc6c28f6c.js" async=""></script><script src="/_next/static/chunks/697-05cf55b6c667773f.js" async=""></script><script src="/_next/static/chunks/458-75822399a849befa.js" async=""></script><script src="/_next/static/chunks/249-e04c1de6240fd78a.js" async=""></script><script src="/_next/static/chunks/429-3a8e078af4ea04bd.js" async=""></script><script src="/_next/static/chunks/app/layout-572650e435947896.js" async=""></script><meta name="robots" content="noindex"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="h-dvh overflow-hidden"><div class="flex h-dvh items-center justify-center text-sm text-muted-foreground">Loading...</div><script src="/_next/static/chunks/webpack-d6388c5dcd85b0c5.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/7d4d1db5aa137b5a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[11815,[],\"\"]\n4:I[55092,[],\"\"]\n5:I[82023,[],\"\"]\n6:I[68762,[\"384\",\"static/chunks/384-484184f146e1b764.js\",\"806\",\"static/chunks/806-195d4d5cc6c28f6c.js\",\"697\",\"static/chunks/697-05cf55b6c667773f.js\",\"458\",\"static/chunks/458-75822399a849befa.js\",\"249\",\"static/chunks/249-e04c1de6240fd78a.js\",\"429\",\"static/chunks/429-3a8e078af4ea04bd.js\",\"185\",\"static/chunks/app/layout-572650e435947896.js\"],\"default\",1]\nc:I[91584,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"ZaapgyqOj6AXHY5zdw6_X\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7d4d1db5aa137b5a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}],\"params\":{}}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-312a564ec7e2663f.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__SSG_MANIFEST=new Set(["\u002Fruns\u002F[id]"]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
|