@double-coding/flow2spec-core
Advanced tools
+4
-0
| /** | ||
| * flow2spec init 支持的 AI 工具配置目录。 | ||
| * 知识库统一写入项目根 `.Knowledge/`(含 template),rules/skills 保留在各配置根。 | ||
| * `root: null` 表示虚拟目标(如 plugin 插件模式):不写任何配置根, | ||
| * skills/rules/hooks 由客户端插件提供,项目侧仅落 .Knowledge 与 flow2spec.config.json。 | ||
| */ | ||
@@ -10,2 +12,3 @@ const AGENTS = { | ||
| dsh: { root: ".dsh", label: "DeepSeek Harness" }, | ||
| plugin: { root: null, label: "插件模式(仅知识库,能力由客户端插件提供)" }, | ||
| }; | ||
@@ -20,2 +23,3 @@ | ||
| dsh: ["skills", "topics"], | ||
| plugin: [], | ||
| }; | ||
@@ -22,0 +26,0 @@ |
+12
-7
@@ -178,2 +178,5 @@ const fs = require("fs"); | ||
| const agentsPath = path.join(cwd, "AGENTS.md"); | ||
| const needsAgentsEntry = [".codex", ".dsh"].some((root) => | ||
| fs.existsSync(path.join(cwd, root)), | ||
| ); | ||
| checks.push( | ||
@@ -185,5 +188,7 @@ fs.existsSync(agentsPath) | ||
| "项目入口", | ||
| STATUS.error, | ||
| "缺少根 AGENTS.md。", | ||
| "运行 flow2spec init codex 或 flow2spec init dsh,或重新初始化所需 Agent。", | ||
| needsAgentsEntry ? STATUS.error : STATUS.warning, | ||
| needsAgentsEntry | ||
| ? "缺少根 AGENTS.md。" | ||
| : "未检测到根 AGENTS.md(插件模式项目属正常)。", | ||
| "Codex/DSH 用户运行 flow2spec init codex 或 flow2spec init dsh;插件模式(flow2spec init plugin)无需此文件。", | ||
| ), | ||
@@ -216,4 +221,4 @@ ); | ||
| }; | ||
| const initializedAgents = Object.entries(AGENTS).filter(([, agent]) => | ||
| fs.existsSync(path.join(cwd, agent.root)), | ||
| const initializedAgents = Object.entries(AGENTS).filter( | ||
| ([, agent]) => agent.root && fs.existsSync(path.join(cwd, agent.root)), | ||
| ); | ||
@@ -226,4 +231,4 @@ if (initializedAgents.length === 0) { | ||
| STATUS.warning, | ||
| "未检测到 .codex、.claude、.cursor 或 .dsh 配置根。", | ||
| "运行 flow2spec init <agent> 初始化实际使用的 Agent。", | ||
| "未检测到 .codex、.claude、.cursor 或 .dsh 配置根(插件模式项目属正常)。", | ||
| "使用本地客户端时运行 flow2spec init <agent>;插件模式(flow2spec init plugin)无需配置根。", | ||
| ), | ||
@@ -230,0 +235,0 @@ ); |
+2
-0
@@ -1280,2 +1280,4 @@ const path = require("path"); | ||
| for (const id of ids) { | ||
| // 虚拟目标(root: null,如 plugin 插件模式):能力由客户端插件提供,不写配置根。 | ||
| if (!AGENTS[id].root) continue; | ||
| ensureAgentDirs(cwd, id); | ||
@@ -1282,0 +1284,0 @@ writeAgentArtifacts(cwd, id, templatesDir, projectConfig); |
+1
-1
| { | ||
| "name": "@double-coding/flow2spec-core", | ||
| "version": "3.5.0", | ||
| "version": "3.6.0", | ||
| "templateVersion": "3.5.0", | ||
@@ -5,0 +5,0 @@ "description": "Flow2Spec Core APIs, knowledge engine, project initialization and shared resources", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
848119
0.1%6078
0.18%