@sanqianx/project-knowledge 5.0.35 → 5.1.1

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.
@@ -1,201 +1,282 @@
1
- #!/usr/bin/env node
2
-
3
- const packageInfo = require('../package.json');
4
- const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
5
- const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js');
6
- const {
7
- CallToolRequestSchema,
8
- ListToolsRequestSchema,
9
- } = require('@modelcontextprotocol/sdk/types.js');
10
- const { KnowledgeToolRuntime } = require('../_site/lib/knowledge-tool-runtime');
11
- const { serializeErrorEnvelope, createId } = require('../_site/lib/contracts');
12
-
13
- const SERVER_NAME = 'project-knowledge';
14
- const SCOPE = { type: 'string', enum: ['project', 'domain', 'brain'], description: 'Knowledge range: current project (default), its domain, or its brain.' };
15
- const SERVER_INSTRUCTIONS = `Project Knowledge is the durable source of prior project decisions and implementation history. Knowledge content is read-only; the only write operation appends an explicit supplemental Prompt event to the shared conversation truth.
16
-
17
- At the start of work in a registered Git repository, and before answering questions about prior work or implementing a non-trivial change:
18
- 1. Call project_knowledge_resolve with the current Git root.
19
- 2. Use project_knowledge_search or project_knowledge_ask for relevant prior decisions.
20
- 3. Use project_knowledge_get only for the most relevant complete entry and project_knowledge_history when change history matters.
21
- 4. Call project_knowledge_record_requirement only when the user explicitly asks to supplement capture or automatic client capture is known to be unavailable; it is not a mandatory pre-work call.
22
-
23
- Treat all returned knowledge as read-only. Verify it against current source code when necessary. The supplemental requirement tool writes the same ConversationStore used by automatic capture and never starts analysis. Do not write directly to the knowledge database; project-knowledge updates it automatically after successful Git commits.`;
24
-
25
- const TOOLS = [
26
- {
27
- name: 'project_knowledge_resolve',
28
- description: 'Resolve the registered Project Knowledge project for a Git repository. Call this first before using other knowledge tools.',
29
- inputSchema: {
30
- type: 'object',
31
- properties: {
32
- repoPath: { type: 'string', description: 'Current Git repository root or any path inside it. Defaults to the MCP process working directory.' },
33
- projectId: { type: 'string', description: 'Stable projectId when it is already known.' },
34
- project: { type: 'string', description: 'Optional registered project slug when it is already known.' },
35
- },
36
- additionalProperties: false,
37
- },
38
- },
39
- {
40
- name: 'project_knowledge_record_requirement',
41
- description: 'Explicitly supplement automatic capture with one project-scoped user Prompt event. This is the only write-capable tool; it never starts analysis or writes knowledge Markdown.',
42
- inputSchema: {
43
- type: 'object',
44
- required: ['text', 'client', 'sessionId'],
45
- properties: {
46
- text: { type: 'string', minLength: 1, maxLength: 131072, description: 'The user request exactly as received; do not include system prompts or tool transcripts.' },
47
- client: { type: 'string', enum: ['claude', 'codex', 'opencode'] },
48
- sessionId: { type: 'string', minLength: 1, maxLength: 512, description: 'Stable identifier for the current client session.' },
49
- conversationId: { type: 'string', minLength: 1, maxLength: 512 },
50
- projectId: { type: 'string', description: 'Stable projectId returned by project_knowledge_resolve.' },
51
- repoPath: { type: 'string', description: 'Current Git root. Used for exact project resolution when projectId is omitted.' },
52
- explicitCommit: { type: 'string', description: 'Optional Git commit explicitly associated with this requirement.' },
53
- },
54
- anyOf: [{ required: ['projectId'] }, { required: ['repoPath'] }],
55
- additionalProperties: false,
56
- },
57
- },
58
- {
59
- name: 'project_knowledge_search',
60
- description: 'Search the same durable knowledge and commit citations as the product UI, within the selected project, domain or brain. This tool is read-only.',
61
- inputSchema: {
62
- type: 'object',
63
- required: ['query'],
64
- properties: {
65
- query: { type: 'string', minLength: 1 },
66
- repoPath: { type: 'string', description: 'Current Git repository root or a path inside it.' },
67
- projectId: { type: 'string', description: 'Stable projectId returned by project_knowledge_resolve.' },
68
- project: { type: 'string', description: 'Optional registered project slug.' },
69
- limit: { type: 'integer', minimum: 1, maximum: 30, default: 8 },
70
- scope: SCOPE,
71
- },
72
- additionalProperties: false,
73
- },
74
- },
75
- {
76
- name: 'project_knowledge_ask',
77
- description: 'Return a compact answer with citations from durable project knowledge. This tool is read-only.',
78
- inputSchema: {
79
- type: 'object',
80
- required: ['query'],
81
- properties: {
82
- query: { type: 'string', minLength: 1 },
83
- repoPath: { type: 'string' },
84
- projectId: { type: 'string' },
85
- project: { type: 'string' },
86
- limit: { type: 'integer', minimum: 1, maximum: 30, default: 8 },
87
- scope: SCOPE,
88
- },
89
- additionalProperties: false,
90
- },
91
- },
92
- {
93
- name: 'project_knowledge_get',
94
- description: 'Read one complete knowledge entry selected from search results. This tool is read-only and scope checked.',
95
- inputSchema: {
96
- type: 'object',
97
- required: ['entry'],
98
- properties: {
99
- entry: { type: 'string', minLength: 1, description: 'Entry identifier returned by search.' },
100
- space: { type: 'string', description: 'Optional scoped knowledge space identifier.' },
101
- spaceId: { type: 'string', description: 'Knowledge space identifier returned by a citation; alias of space.' },
102
- scope: SCOPE,
103
- repoPath: { type: 'string' },
104
- projectId: { type: 'string' },
105
- project: { type: 'string' },
106
- },
107
- additionalProperties: false,
108
- },
109
- },
110
- {
111
- name: 'project_knowledge_history',
112
- description: 'Read recent durable change history for the current project and its allowed scope. This tool is read-only.',
113
- inputSchema: {
114
- type: 'object',
115
- properties: {
116
- repoPath: { type: 'string' },
117
- projectId: { type: 'string' },
118
- project: { type: 'string' },
119
- limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
120
- scope: SCOPE,
121
- },
122
- additionalProperties: false,
123
- },
124
- },
125
- ];
126
-
127
- function toolContent(result) {
128
- return {
129
- content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
130
- structuredContent: result,
131
- isError: false,
132
- };
133
- }
134
-
135
- function callTool(runtime, name, args) {
136
- if (name === 'project_knowledge_resolve') return runtime.resolveProject(args);
137
- if (name === 'project_knowledge_record_requirement') return runtime.recordRequirement(args);
138
- if (name === 'project_knowledge_search') return runtime.search(args);
139
- if (name === 'project_knowledge_ask') return runtime.ask(args);
140
- if (name === 'project_knowledge_get') return runtime.get(args);
141
- if (name === 'project_knowledge_history') return runtime.history(args);
142
- throw new Error(`unknown tool: ${name}`);
143
- }
144
-
145
- function createServer(options = {}) {
146
- const runtime = options.runtime || new KnowledgeToolRuntime();
147
- const server = new Server(
148
- { name: SERVER_NAME, version: packageInfo.version },
149
- {
150
- capabilities: { tools: { listChanged: false } },
151
- instructions: SERVER_INSTRUCTIONS,
152
- },
153
- );
154
- server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
155
- server.setRequestHandler(CallToolRequestSchema, async request => {
156
- const name = String(request.params?.name || '');
157
- const args = request.params?.arguments && typeof request.params.arguments === 'object'
158
- ? request.params.arguments
159
- : {};
160
- try {
161
- return toolContent(await callTool(runtime, name, args));
162
- } catch (error) {
163
- const operationId = createId('op');
164
- return {
165
- content: [{ type: 'text', text: JSON.stringify(serializeErrorEnvelope(error, operationId)) }],
166
- isError: true,
167
- };
168
- }
169
- });
170
- return { server, runtime };
171
- }
172
-
173
- async function main() {
174
- const { server, runtime } = createServer();
175
- const transport = new StdioServerTransport();
176
- let closing = false;
177
- const close = async () => {
178
- if (closing) return;
179
- closing = true;
180
- await runtime.close();
181
- await server.close();
182
- };
183
- process.once('SIGINT', () => close().finally(() => process.exit(0)));
184
- process.once('SIGTERM', () => close().finally(() => process.exit(0)));
185
- await server.connect(transport);
186
- }
187
-
188
- if (require.main === module) {
189
- main().catch(error => {
190
- process.stderr.write(`[project-knowledge-mcp] ${JSON.stringify(serializeErrorEnvelope(error, createId('op')))}\n`);
191
- process.exit(1);
192
- });
193
- }
194
-
195
- module.exports = {
196
- callTool,
197
- createServer,
198
- SERVER_INSTRUCTIONS,
199
- SERVER_NAME,
200
- TOOLS,
201
- };
1
+ #!/usr/bin/env node
2
+
3
+ const packageInfo = require('../package.json');
4
+ const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
5
+ const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js');
6
+ const {
7
+ CallToolRequestSchema,
8
+ ListToolsRequestSchema,
9
+ } = require('@modelcontextprotocol/sdk/types.js');
10
+ const { KnowledgeToolRuntime } = require('../_site/lib/knowledge-tool-runtime');
11
+ const { WorkflowToolRuntime } = require('../_site/lib/workflow-tool-runtime');
12
+ const { serializeErrorEnvelope, createId } = require('../_site/lib/contracts');
13
+
14
+ const SERVER_NAME = 'project-knowledge';
15
+ const SCOPE = { type: 'string', enum: ['project', 'domain', 'brain'], description: 'Knowledge range: current project (default), its domain, or its brain.' };
16
+ const SERVER_INSTRUCTIONS = `Project Knowledge is the durable source of prior project decisions and implementation history. Knowledge content is read-only; the only write operation appends an explicit supplemental Prompt event to the shared conversation truth.
17
+
18
+ At the start of work in a registered Git repository, and before answering questions about prior work or implementing a non-trivial change:
19
+ 1. Call project_knowledge_resolve with the current Git root.
20
+ 2. Use project_knowledge_search or project_knowledge_ask for relevant prior decisions.
21
+ 3. Use project_knowledge_get only for the most relevant complete entry and project_knowledge_history when change history matters.
22
+ 4. Call project_knowledge_record_requirement only when the user explicitly asks to supplement capture or automatic client capture is known to be unavailable; it is not a mandatory pre-work call.
23
+
24
+ Treat all returned knowledge as read-only. Verify it against current source code when necessary. The supplemental requirement tool writes the same ConversationStore used by automatic capture and never starts analysis. Do not write directly to the knowledge database; project-knowledge updates it automatically after successful Git commits.`;
25
+
26
+ // AI-team workflow tools: thin adapters over the independent workflow module
27
+ // via the shell proxy (/api/workflow/*) — no second copy of task state.
28
+ const WORKFLOW_TOOLS = [
29
+ {
30
+ name: 'project_workflow_start',
31
+ description: 'Start an AI-team business task for the current repository: creates the task with acceptance items and binds this native session (declared basis). Returns the short task contract and taskId.',
32
+ inputSchema: {
33
+ type: 'object',
34
+ required: ['title'],
35
+ properties: {
36
+ title: { type: 'string', minLength: 1, maxLength: 200, description: 'One-line task title from the user request.' },
37
+ goal: { type: 'string', description: 'What "done" means for the user; the original wording beats a paraphrase.' },
38
+ acceptance: { type: 'array', items: { type: 'object', properties: { title: { type: 'string' }, kind: { type: 'string', enum: ['automated', 'manual', 'model_review'] } }, required: ['title'] }, description: 'Verifiable acceptance items.' },
39
+ projectId: { type: 'string' },
40
+ client: { type: 'string', enum: ['claude', 'codex', 'opencode', 'zcode'], description: 'Calling native client.' },
41
+ sessionId: { type: 'string', description: 'Stable native session identifier for event attribution.' },
42
+ memberId: { type: 'string', description: 'Team member that owns this task, when the caller is a named member.' },
43
+ workspaceIdentity: { type: 'string' },
44
+ },
45
+ additionalProperties: false,
46
+ },
47
+ },
48
+ {
49
+ name: 'project_workflow_resume',
50
+ description: 'Resume an existing AI-team task by taskId: returns goal, acceptance with the current revision, confirmed decisions, verified results, remaining items and the next action.',
51
+ inputSchema: { type: 'object', required: ['taskId'], properties: { taskId: { type: 'string' } }, additionalProperties: false },
52
+ },
53
+ {
54
+ name: 'project_workflow_status',
55
+ description: 'Read one AI-team task by taskId, or the active task list (filter by projectId/status). Read-only.',
56
+ inputSchema: { type: 'object', properties: { taskId: { type: 'string' }, projectId: { type: 'string' }, status: { type: 'string' } }, additionalProperties: false },
57
+ },
58
+ {
59
+ name: 'project_workflow_checkpoint',
60
+ description: 'Record a checkpoint on an AI-team task. kind="fact" is a verified fact (updates nextAction); kind="candidate" is an inference kept separate.',
61
+ inputSchema: {
62
+ type: 'object',
63
+ required: ['taskId'],
64
+ properties: {
65
+ taskId: { type: 'string' },
66
+ kind: { type: 'string', enum: ['fact', 'candidate'] },
67
+ summary: { type: 'string' },
68
+ decided: { type: 'array', items: { type: 'string' } },
69
+ verifiedResults: { type: 'array', items: { type: 'string' } },
70
+ remaining: { type: 'array', items: { type: 'string' } },
71
+ nextAction: { type: 'string' },
72
+ },
73
+ additionalProperties: false,
74
+ },
75
+ },
76
+ {
77
+ name: 'project_workflow_request_review',
78
+ description: 'Submit the current task snapshot for the delivery check/review pipeline.',
79
+ inputSchema: { type: 'object', required: ['taskId'], properties: { taskId: { type: 'string' }, note: { type: 'string' } }, additionalProperties: false },
80
+ },
81
+ {
82
+ name: 'project_workflow_review_result',
83
+ description: 'Fetch the review/verification results for a task once a review has run.',
84
+ inputSchema: { type: 'object', required: ['taskId'], properties: { taskId: { type: 'string' } }, additionalProperties: false },
85
+ },
86
+ ];
87
+
88
+ const TOOLS = [
89
+ {
90
+ name: 'project_knowledge_resolve',
91
+ description: 'Resolve the registered Project Knowledge project for a Git repository. Call this first before using other knowledge tools.',
92
+ inputSchema: {
93
+ type: 'object',
94
+ properties: {
95
+ repoPath: { type: 'string', description: 'Current Git repository root or any path inside it. Defaults to the MCP process working directory.' },
96
+ projectId: { type: 'string', description: 'Stable projectId when it is already known.' },
97
+ project: { type: 'string', description: 'Optional registered project slug when it is already known.' },
98
+ },
99
+ additionalProperties: false,
100
+ },
101
+ },
102
+ {
103
+ name: 'project_knowledge_record_requirement',
104
+ description: 'Explicitly supplement automatic capture with one project-scoped user Prompt event. This is the only write-capable tool; it never starts analysis or writes knowledge Markdown.',
105
+ inputSchema: {
106
+ type: 'object',
107
+ required: ['text', 'client', 'sessionId'],
108
+ properties: {
109
+ text: { type: 'string', minLength: 1, maxLength: 131072, description: 'The user request exactly as received; do not include system prompts or tool transcripts.' },
110
+ client: { type: 'string', enum: ['claude', 'codex', 'opencode'] },
111
+ sessionId: { type: 'string', minLength: 1, maxLength: 512, description: 'Stable identifier for the current client session.' },
112
+ conversationId: { type: 'string', minLength: 1, maxLength: 512 },
113
+ projectId: { type: 'string', description: 'Stable projectId returned by project_knowledge_resolve.' },
114
+ repoPath: { type: 'string', description: 'Current Git root. Used for exact project resolution when projectId is omitted.' },
115
+ explicitCommit: { type: 'string', description: 'Optional Git commit explicitly associated with this requirement.' },
116
+ },
117
+ anyOf: [{ required: ['projectId'] }, { required: ['repoPath'] }],
118
+ additionalProperties: false,
119
+ },
120
+ },
121
+ {
122
+ name: 'project_knowledge_search',
123
+ description: 'Search the same durable knowledge and commit citations as the product UI, within the selected project, domain or brain. This tool is read-only.',
124
+ inputSchema: {
125
+ type: 'object',
126
+ required: ['query'],
127
+ properties: {
128
+ query: { type: 'string', minLength: 1 },
129
+ repoPath: { type: 'string', description: 'Current Git repository root or a path inside it.' },
130
+ projectId: { type: 'string', description: 'Stable projectId returned by project_knowledge_resolve.' },
131
+ project: { type: 'string', description: 'Optional registered project slug.' },
132
+ limit: { type: 'integer', minimum: 1, maximum: 30, default: 8 },
133
+ scope: SCOPE,
134
+ },
135
+ additionalProperties: false,
136
+ },
137
+ },
138
+ {
139
+ name: 'project_knowledge_ask',
140
+ description: 'Return a compact answer with citations from durable project knowledge. This tool is read-only.',
141
+ inputSchema: {
142
+ type: 'object',
143
+ required: ['query'],
144
+ properties: {
145
+ query: { type: 'string', minLength: 1 },
146
+ repoPath: { type: 'string' },
147
+ projectId: { type: 'string' },
148
+ project: { type: 'string' },
149
+ limit: { type: 'integer', minimum: 1, maximum: 30, default: 8 },
150
+ scope: SCOPE,
151
+ },
152
+ additionalProperties: false,
153
+ },
154
+ },
155
+ {
156
+ name: 'project_knowledge_get',
157
+ description: 'Read one complete knowledge entry selected from search results. This tool is read-only and scope checked.',
158
+ inputSchema: {
159
+ type: 'object',
160
+ required: ['entry'],
161
+ properties: {
162
+ entry: { type: 'string', minLength: 1, description: 'Entry identifier returned by search.' },
163
+ space: { type: 'string', description: 'Optional scoped knowledge space identifier.' },
164
+ spaceId: { type: 'string', description: 'Knowledge space identifier returned by a citation; alias of space.' },
165
+ scope: SCOPE,
166
+ repoPath: { type: 'string' },
167
+ projectId: { type: 'string' },
168
+ project: { type: 'string' },
169
+ },
170
+ additionalProperties: false,
171
+ },
172
+ },
173
+ {
174
+ name: 'project_knowledge_history',
175
+ description: 'Read recent durable change history for the current project and its allowed scope. This tool is read-only.',
176
+ inputSchema: {
177
+ type: 'object',
178
+ properties: {
179
+ repoPath: { type: 'string' },
180
+ projectId: { type: 'string' },
181
+ project: { type: 'string' },
182
+ limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 },
183
+ scope: SCOPE,
184
+ },
185
+ additionalProperties: false,
186
+ },
187
+ },
188
+ ...WORKFLOW_TOOLS,
189
+ ];
190
+
191
+ function toolContent(result) {
192
+ return {
193
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
194
+ structuredContent: result,
195
+ isError: false,
196
+ };
197
+ }
198
+
199
+ function callTool(runtime, workflowRuntimeOrName, nameOrArgs, maybeArgs) {
200
+ // Accept both the internal signature (runtime, workflowRuntime, name, args)
201
+ // and the exported legacy signature (runtime, name, args) used by tests.
202
+ let workflowRuntime = workflowRuntimeOrName;
203
+ let name = nameOrArgs;
204
+ let args = maybeArgs;
205
+ if (typeof workflowRuntimeOrName === 'string') {
206
+ name = workflowRuntimeOrName;
207
+ args = nameOrArgs;
208
+ workflowRuntime = null;
209
+ }
210
+ if (name === 'project_knowledge_resolve') return runtime.resolveProject(args);
211
+ if (name === 'project_knowledge_record_requirement') return runtime.recordRequirement(args);
212
+ if (name === 'project_knowledge_search') return runtime.search(args);
213
+ if (name === 'project_knowledge_ask') return runtime.ask(args);
214
+ if (name === 'project_knowledge_get') return runtime.get(args);
215
+ if (name === 'project_knowledge_history') return runtime.history(args);
216
+ if (name === 'project_workflow_start') return workflowRuntime.start(args);
217
+ if (name === 'project_workflow_resume') return workflowRuntime.resume(args);
218
+ if (name === 'project_workflow_status') return workflowRuntime.status(args);
219
+ if (name === 'project_workflow_checkpoint') return workflowRuntime.checkpoint(args);
220
+ if (name === 'project_workflow_request_review') return workflowRuntime.requestReview(args);
221
+ if (name === 'project_workflow_review_result') return workflowRuntime.reviewResult(args);
222
+ throw new Error(`unknown tool: ${name}`);
223
+ }
224
+
225
+ function createServer(options = {}) {
226
+ const runtime = options.runtime || new KnowledgeToolRuntime();
227
+ const workflowRuntime = options.workflowRuntime || new WorkflowToolRuntime();
228
+ const server = new Server(
229
+ { name: SERVER_NAME, version: packageInfo.version },
230
+ {
231
+ capabilities: { tools: { listChanged: false } },
232
+ instructions: SERVER_INSTRUCTIONS,
233
+ },
234
+ );
235
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
236
+ server.setRequestHandler(CallToolRequestSchema, async request => {
237
+ const name = String(request.params?.name || '');
238
+ const args = request.params?.arguments && typeof request.params.arguments === 'object'
239
+ ? request.params.arguments
240
+ : {};
241
+ try {
242
+ return toolContent(await callTool(runtime, workflowRuntime, name, args));
243
+ } catch (error) {
244
+ const operationId = createId('op');
245
+ return {
246
+ content: [{ type: 'text', text: JSON.stringify(serializeErrorEnvelope(error, operationId)) }],
247
+ isError: true,
248
+ };
249
+ }
250
+ });
251
+ return { server, runtime, workflowRuntime };
252
+ }
253
+
254
+ async function main() {
255
+ const { server, runtime } = createServer();
256
+ const transport = new StdioServerTransport();
257
+ let closing = false;
258
+ const close = async () => {
259
+ if (closing) return;
260
+ closing = true;
261
+ await runtime.close();
262
+ await server.close();
263
+ };
264
+ process.once('SIGINT', () => close().finally(() => process.exit(0)));
265
+ process.once('SIGTERM', () => close().finally(() => process.exit(0)));
266
+ await server.connect(transport);
267
+ }
268
+
269
+ if (require.main === module) {
270
+ main().catch(error => {
271
+ process.stderr.write(`[project-knowledge-mcp] ${JSON.stringify(serializeErrorEnvelope(error, createId('op')))}\n`);
272
+ process.exit(1);
273
+ });
274
+ }
275
+
276
+ module.exports = {
277
+ callTool,
278
+ createServer,
279
+ SERVER_INSTRUCTIONS,
280
+ SERVER_NAME,
281
+ TOOLS,
282
+ };
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schema": "project-knowledge/module-content/v1",
3
3
  "productFiles": {
4
- "ui/index.html": "2e89f6fc40b9c01098a536433aae62e9dbe4c72da0678ab1219d65c79e7a666c",
4
+ "ui/index.html": "55cbc1c20b5f88c7c21b50bc1b68d52ce3c94280f001567513e304d33c6933e1",
5
5
  "ui/knowledge-panel.html": "dfd85f15759472252d797853263e9da0054b251c56bb9ccdc8a75e6301334ca8",
6
- "ui/product.js": "952256f52aa4b371fd6756f5d4479086c9782fb16d66c6ee0235b0c0adee76d6",
6
+ "ui/product.js": "85a025627a81e190466d5817ff488ac372008bb8760308e656cf95e10f617ac3",
7
7
  "ui/live-client.js": "0d81fa894c629bb839e1931fc3c5ebad4d831aae8232d6ce8c0f542e9e3559e8",
8
8
  "ui/product.css": "b7e2e6b1c1429078109e7742111f03a01a61f54895cf8ac733b83672cf31dca7",
9
9
  "ui/favicon.svg": "c48be946b224112ebb0238b44263f7a61bda31e531afa895c2e9801c0ff24f32",
@@ -11,9 +11,9 @@
11
11
  "plugins/project-knowledge/hooks/codex.json": "216e03c07295606ef6ebb2c4f669ad0d790b5e7c4f3f34600488033db75e4239",
12
12
  "plugins/project-knowledge/scripts/context-hook.cjs": "ddc1f6f5638c662adbbf4391557bbeb7196af2fb869e7ecfeefba76b9bab5760",
13
13
  "plugins/project-knowledge/scripts/mcp-launcher.cjs": "7c68830b5c73eb53ef030756a4de33987f7eab6b1a6cc15602835aac3f954893",
14
- "plugins/project-knowledge/.claude-plugin/plugin.json": "4f32f5320cd7a7152bd0ca7de5ccc5e5ebd4c162b13f91f9f5afc53c0592ff7c",
15
- "plugins/project-knowledge/.codex-plugin/plugin.json": "531bec48f91696f416475bd99f05a77871a6b2996eaba9180e0a0289691f7528",
16
- "plugins/project-knowledge/.mcp.json": "bc4ce08acb57097dfc21785150c0a37597f60c6ca98f320098ce1959b4a2bd09",
14
+ "plugins/project-knowledge/.claude-plugin/plugin.json": "f0d8ce9139185495e0c7e28b8b9f2cc2fcbc014ca963ebd4e96c1581d6de8762",
15
+ "plugins/project-knowledge/.codex-plugin/plugin.json": "e8dd5a17e4bc99dd2a152d51fc63e54818f416e720f9480e6e26f0439201b4a5",
16
+ "plugins/project-knowledge/.mcp.json": "1cc8b56db7d590da76a2b83b8238a948e48b11215219676e7e1727a4f2f135c0",
17
17
  "ui/version-info.js": "01a82217b031de54b80d6c7974da9c70888c4c90a046bd4248a808f7989ddce7",
18
18
  "ui/version-info.css": "209fad8e42b661f72d2aba3280e1ca47768b5cefb776fe5459538d34fbad120f"
19
19
  },
@@ -315,6 +315,31 @@
315
315
  "src/memory-groups.js": "92b5edbd0ec7c9a3cf505d4683a053ea71d7ceeb7cfbe049bc65342a39c0c8f2",
316
316
  "src/retry-scheduler.js": "048c11b767617e0c621c231e91029b4e5e834ae3e7ebc3c84b5168ea9f92ec57"
317
317
  }
318
+ },
319
+ "workflow": {
320
+ "name": "@sanqianx/ai-coding-workflow",
321
+ "installName": "@sanqianx/ai-coding-workflow",
322
+ "version": "0.1.1",
323
+ "files": {
324
+ "src/bin.js": "12f74b2c790d99b595cade2b83a4d74906e5a01ae041dbbe453d75573263d0c4",
325
+ "src/checks.js": "54043cbe773f2b6df871db6a07446ab82e42bd6bd45142ab51e238257d2e9532",
326
+ "src/consumer.js": "beff1aa039179ccb9ae46e014dacb4a6695b789354849843a829403dbc2033fe",
327
+ "src/digests.js": "dd90e639d21c3b59a604e3280f214d0b4ed178e3c659c18b90d31b5479913332",
328
+ "src/domain.js": "5b404a7df138aed5797dd953300c31beba56121174fb09f20578e54f3599105a",
329
+ "src/errors.js": "1868330aa021b3dba5e92061dbb41e15a94f4cb0746f870c49aac4bf6119d708",
330
+ "src/identity.js": "c9f96f74313f0dcf5dfc730dfa03b1c1f5e85ee1dfae34cdbf0c28217621c6ff",
331
+ "src/server.js": "8eb11482474ea92436116edbe6409cc8775b3b463f8c6879655f2c7f0b648a56",
332
+ "src/snapshots.js": "2a92388000780ff78889c2148131039558e853387ba3b05c0d5ef644d9e48485",
333
+ "src/store.js": "506fad917b9cd87538617a4ae2ef172ceb696483dad6d123b3be3ebb9f2f510e",
334
+ "src/tasks.js": "1e53f570b16833c8ea13b261d6d7a361bb765eaadd729de84e0f58d4ef264043",
335
+ "ui/index.html": "058b9c0bb727ddd8f18f1aa907eb31be2321c42b2ad778e2f037904bb53fd916",
336
+ "ui/app.js": "9a2ecec709f9beca01d70a0286f0fce604e526d71b73a6e8c6a414d27e285df3",
337
+ "ui/app.css": "4f2cf3d56c0efd99815f3d6e0280ea8dcca5757cc633aac49d8c712f3e721dac",
338
+ "docs/contract.md": "aba0a189744fe159702152c07c28f5975b47f917f28bc0678e1191714060a23f",
339
+ "README.md": "0ee483525831969a3855d942cbb2388d0c6a72e160bfa3c4fd33ee1bc729d1c7",
340
+ "LICENSE": "c1b9df1275e769f3dbab000d1e457a2d4b0f28eb5da6c77e48dc37eeba202ed7",
341
+ "package.json": "b70101d063ab6d8bb6863c69f153d771e84fb388396c8b460f569c97c55262ff"
342
+ }
318
343
  }
319
344
  }
320
345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanqianx/project-knowledge",
3
- "version": "5.0.35",
3
+ "version": "5.1.1",
4
4
  "description": "Knowledge base manager with Git integration, AI-driven analysis, and bilingual (zh-CN/en-US) knowledge output",
5
5
  "main": "_site/server.js",
6
6
  "scripts": {
@@ -88,6 +88,7 @@
88
88
  "@modelcontextprotocol/sdk": "1.29.0",
89
89
  "@sanqianx/ai-coding-event-bridge-console": "0.7.4",
90
90
  "@sanqianx/ai-coding-knowledge-engine": "0.2.9",
91
+ "@sanqianx/ai-coding-workflow": "0.1.1",
91
92
  "@sanqianx/vector-hub": "1.0.8-rc.8",
92
93
  "buffer": "^6.0.3",
93
94
  "cheerio": "^1.2.0",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "project-knowledge",
4
4
  "hooks": "./hooks/claude.json",
5
- "version": "5.0.35",
5
+ "version": "5.1.1",
6
6
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
7
7
  "author": {
8
8
  "name": "SanQianX",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-knowledge",
3
- "version": "5.0.35",
3
+ "version": "5.1.1",
4
4
  "description": "Read durable project decisions and implementation history from Project Knowledge.",
5
5
  "author": {
6
6
  "name": "SanQianX",
@@ -8,7 +8,7 @@
8
8
  "const fs=require('fs'),path=require('path'),os=require('os');const PKG='@sanqianx/project-knowledge',SC='project-knowledge/integration-runtime/v1';let f='';const root=process.env.CLAUDE_PLUGIN_ROOT||process.env.PLUGIN_ROOT;if(root){f=path.join(root,'scripts','mcp-launcher.cjs');if(!fs.existsSync(f))f=''}if(!f){const dd=process.env.KB_DATA_DIR||path.join(os.homedir(),'.project-knowledge-v5');try{const bp=path.join(dd,'integration-runtime.json');const st=fs.statSync(bp);if(st.isFile()&&st.size<=32768){const b=JSON.parse(fs.readFileSync(bp,'utf8'));if(b&&b.schema===SC&&b.packageName===PKG&&typeof b.packageRoot==='string'&&path.isAbsolute(b.packageRoot)){const c=path.join(b.packageRoot,'plugins','project-knowledge','scripts','mcp-launcher.cjs');const rr=fs.realpathSync(b.packageRoot),cr=fs.realpathSync(c);const rel=path.relative(rr,cr);if(rel&&rel!=='..'&&!rel.startsWith('..'+path.sep)&&!path.isAbsolute(rel)&&fs.statSync(cr).isFile())f=cr}}}catch(e){}}if(!f){console.error('[project-knowledge-mcp] 未能通过受信任插件根或已验证的安装绑定定位启动器,已停止;不访问网络,也不加载工作目录源码。');process.exit(127)}require(f);"
9
9
  ],
10
10
  "env": {
11
- "KB_PLUGIN_VERSION": "5.0.35"
11
+ "KB_PLUGIN_VERSION": "5.1.1"
12
12
  }
13
13
  }
14
14
  }