New:Socket for Asana Is Now Available.Learn more
Get Started

@double-coding/flow2spec-core

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@double-coding/flow2spec-core - npm Package Compare versions

Comparing version
3.5.0
to
3.6.0
+4
-0
lib/agents.js
/**
* 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 @@ );

@@ -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);

{
"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",