@lumenflow/mcp 2.18.3 → 2.19.0
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/tools/agent-tools.d.ts +26 -0
- package/dist/tools/agent-tools.d.ts.map +1 -0
- package/dist/tools/agent-tools.js +161 -0
- package/dist/tools/agent-tools.js.map +1 -0
- package/dist/tools/context-tools.d.ts +19 -0
- package/dist/tools/context-tools.d.ts.map +1 -0
- package/dist/tools/context-tools.js +73 -0
- package/dist/tools/context-tools.js.map +1 -0
- package/dist/tools/flow-tools.d.ts +30 -0
- package/dist/tools/flow-tools.d.ts.map +1 -0
- package/dist/tools/flow-tools.js +141 -0
- package/dist/tools/flow-tools.js.map +1 -0
- package/dist/tools/initiative-tools.d.ts +42 -0
- package/dist/tools/initiative-tools.d.ts.map +1 -0
- package/dist/tools/initiative-tools.js +304 -0
- package/dist/tools/initiative-tools.js.map +1 -0
- package/dist/tools/memory-tools.d.ts +66 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +419 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/orchestration-tools.d.ts +26 -0
- package/dist/tools/orchestration-tools.d.ts.map +1 -0
- package/dist/tools/orchestration-tools.js +158 -0
- package/dist/tools/orchestration-tools.js.map +1 -0
- package/dist/tools/parity-tools.d.ts +118 -0
- package/dist/tools/parity-tools.d.ts.map +1 -0
- package/dist/tools/parity-tools.js +897 -0
- package/dist/tools/parity-tools.js.map +1 -0
- package/dist/tools/setup-tools.d.ts +42 -0
- package/dist/tools/setup-tools.d.ts.map +1 -0
- package/dist/tools/setup-tools.js +167 -0
- package/dist/tools/setup-tools.js.map +1 -0
- package/dist/tools/validation-tools.d.ts +34 -0
- package/dist/tools/validation-tools.d.ts.map +1 -0
- package/dist/tools/validation-tools.js +134 -0
- package/dist/tools/validation-tools.js.map +1 -0
- package/dist/tools/wu-tools.d.ts +116 -0
- package/dist/tools/wu-tools.d.ts.map +1 -0
- package/dist/tools/wu-tools.js +711 -0
- package/dist/tools/wu-tools.js.map +1 -0
- package/dist/tools-shared.d.ts +170 -0
- package/dist/tools-shared.d.ts.map +1 -0
- package/dist/tools-shared.js +203 -0
- package/dist/tools-shared.js.map +1 -0
- package/dist/tools.d.ts +34 -466
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +54 -3323
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file agent-tools.ts
|
|
3
|
+
* @description Agent tool implementations
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
* WU-1425: Agent tools: agent_session, agent_session_end, agent_log_issue, agent_issues_query
|
|
7
|
+
* WU-1457: All agent commands use shared schemas
|
|
8
|
+
*/
|
|
9
|
+
import { type ToolDefinition } from '../tools-shared.js';
|
|
10
|
+
/**
|
|
11
|
+
* agent_session - Start an agent session for tracking WU execution
|
|
12
|
+
*/
|
|
13
|
+
export declare const agentSessionTool: ToolDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* agent_session_end - End the current agent session
|
|
16
|
+
*/
|
|
17
|
+
export declare const agentSessionEndTool: ToolDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* agent_log_issue - Log a workflow issue or incident during agent execution
|
|
20
|
+
*/
|
|
21
|
+
export declare const agentLogIssueTool: ToolDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* agent_issues_query - Query and display logged agent incidents
|
|
24
|
+
*/
|
|
25
|
+
export declare const agentIssuesQueryTool: ToolDefinition;
|
|
26
|
+
//# sourceMappingURL=agent-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/tools/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EACL,KAAK,cAAc,EAQpB,MAAM,oBAAoB,CAAC;AAwB5B;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,cA4B9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,cAuBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAsD/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAuBlC,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file agent-tools.ts
|
|
3
|
+
* @description Agent tool implementations
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
* WU-1425: Agent tools: agent_session, agent_session_end, agent_log_issue, agent_issues_query
|
|
7
|
+
* WU-1457: All agent commands use shared schemas
|
|
8
|
+
*/
|
|
9
|
+
import { agentSessionSchema, agentSessionEndSchema, agentLogIssueSchema, agentIssuesQuerySchema, } from '@lumenflow/core';
|
|
10
|
+
import { ErrorCodes, CliArgs, SharedErrorMessages, success, error, runCliCommand, } from '../tools-shared.js';
|
|
11
|
+
/**
|
|
12
|
+
* Error codes for agent tools
|
|
13
|
+
*/
|
|
14
|
+
const AgentErrorCodes = {
|
|
15
|
+
AGENT_SESSION_ERROR: 'AGENT_SESSION_ERROR',
|
|
16
|
+
AGENT_SESSION_END_ERROR: 'AGENT_SESSION_END_ERROR',
|
|
17
|
+
AGENT_LOG_ISSUE_ERROR: 'AGENT_LOG_ISSUE_ERROR',
|
|
18
|
+
AGENT_ISSUES_QUERY_ERROR: 'AGENT_ISSUES_QUERY_ERROR',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Error messages for agent tools
|
|
22
|
+
*/
|
|
23
|
+
const AgentErrorMessages = {
|
|
24
|
+
WU_REQUIRED: SharedErrorMessages.WU_REQUIRED,
|
|
25
|
+
TIER_REQUIRED: 'tier is required',
|
|
26
|
+
CATEGORY_REQUIRED: 'category is required',
|
|
27
|
+
SEVERITY_REQUIRED: 'severity is required',
|
|
28
|
+
TITLE_REQUIRED: 'title is required',
|
|
29
|
+
DESCRIPTION_REQUIRED: 'description is required',
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* agent_session - Start an agent session for tracking WU execution
|
|
33
|
+
*/
|
|
34
|
+
export const agentSessionTool = {
|
|
35
|
+
name: 'agent_session',
|
|
36
|
+
description: 'Start an agent session for tracking WU execution',
|
|
37
|
+
inputSchema: agentSessionSchema,
|
|
38
|
+
async execute(input, options) {
|
|
39
|
+
if (!input.wu) {
|
|
40
|
+
return error(AgentErrorMessages.WU_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
41
|
+
}
|
|
42
|
+
if (input.tier === undefined || input.tier === null) {
|
|
43
|
+
return error(AgentErrorMessages.TIER_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
44
|
+
}
|
|
45
|
+
const args = ['--wu', input.wu, '--tier', String(input.tier)];
|
|
46
|
+
if (input.agent_type)
|
|
47
|
+
args.push('--agent-type', input.agent_type);
|
|
48
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
49
|
+
const result = await runCliCommand('agent:session', args, cliOptions);
|
|
50
|
+
if (result.success) {
|
|
51
|
+
return success({ message: result.stdout || 'Session started' });
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return error(result.stderr || result.error?.message || 'agent:session failed', AgentErrorCodes.AGENT_SESSION_ERROR);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* agent_session_end - End the current agent session
|
|
60
|
+
*/
|
|
61
|
+
export const agentSessionEndTool = {
|
|
62
|
+
name: 'agent_session_end',
|
|
63
|
+
description: 'End the current agent session and return summary',
|
|
64
|
+
inputSchema: agentSessionEndSchema,
|
|
65
|
+
async execute(_input, options) {
|
|
66
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
67
|
+
const result = await runCliCommand('agent:session-end', [], cliOptions);
|
|
68
|
+
if (result.success) {
|
|
69
|
+
try {
|
|
70
|
+
const data = JSON.parse(result.stdout);
|
|
71
|
+
return success(data);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return success({ message: result.stdout || 'Session ended' });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return error(result.stderr || result.error?.message || 'agent:session-end failed', AgentErrorCodes.AGENT_SESSION_END_ERROR);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* agent_log_issue - Log a workflow issue or incident during agent execution
|
|
84
|
+
*/
|
|
85
|
+
export const agentLogIssueTool = {
|
|
86
|
+
name: 'agent_log_issue',
|
|
87
|
+
description: 'Log a workflow issue or incident during agent execution',
|
|
88
|
+
inputSchema: agentLogIssueSchema,
|
|
89
|
+
async execute(input, options) {
|
|
90
|
+
if (!input.category) {
|
|
91
|
+
return error(AgentErrorMessages.CATEGORY_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
92
|
+
}
|
|
93
|
+
if (!input.severity) {
|
|
94
|
+
return error(AgentErrorMessages.SEVERITY_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
95
|
+
}
|
|
96
|
+
if (!input.title) {
|
|
97
|
+
return error(AgentErrorMessages.TITLE_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
98
|
+
}
|
|
99
|
+
if (!input.description) {
|
|
100
|
+
return error(AgentErrorMessages.DESCRIPTION_REQUIRED, ErrorCodes.MISSING_PARAMETER);
|
|
101
|
+
}
|
|
102
|
+
const args = [
|
|
103
|
+
'--category',
|
|
104
|
+
input.category,
|
|
105
|
+
'--severity',
|
|
106
|
+
input.severity,
|
|
107
|
+
'--title',
|
|
108
|
+
input.title,
|
|
109
|
+
CliArgs.DESCRIPTION,
|
|
110
|
+
input.description,
|
|
111
|
+
];
|
|
112
|
+
if (input.resolution)
|
|
113
|
+
args.push('--resolution', input.resolution);
|
|
114
|
+
if (input.tags) {
|
|
115
|
+
for (const tag of input.tags) {
|
|
116
|
+
args.push('--tag', tag);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (input.step)
|
|
120
|
+
args.push('--step', input.step);
|
|
121
|
+
if (input.files) {
|
|
122
|
+
for (const file of input.files) {
|
|
123
|
+
args.push('--file', file);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
127
|
+
const result = await runCliCommand('agent:log-issue', args, cliOptions);
|
|
128
|
+
if (result.success) {
|
|
129
|
+
return success({ message: result.stdout || 'Issue logged' });
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return error(result.stderr || result.error?.message || 'agent:log-issue failed', AgentErrorCodes.AGENT_LOG_ISSUE_ERROR);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* agent_issues_query - Query and display logged agent incidents
|
|
138
|
+
*/
|
|
139
|
+
export const agentIssuesQueryTool = {
|
|
140
|
+
name: 'agent_issues_query',
|
|
141
|
+
description: 'Query and display logged agent incidents/issues summary',
|
|
142
|
+
inputSchema: agentIssuesQuerySchema,
|
|
143
|
+
async execute(input, options) {
|
|
144
|
+
const args = ['summary'];
|
|
145
|
+
if (input.since)
|
|
146
|
+
args.push('--since', String(input.since));
|
|
147
|
+
if (input.category)
|
|
148
|
+
args.push('--category', input.category);
|
|
149
|
+
if (input.severity)
|
|
150
|
+
args.push('--severity', input.severity);
|
|
151
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
152
|
+
const result = await runCliCommand('agent:issues-query', args, cliOptions);
|
|
153
|
+
if (result.success) {
|
|
154
|
+
return success({ message: result.stdout || 'Query complete' });
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
return error(result.stderr || result.error?.message || 'agent:issues-query failed', AgentErrorCodes.AGENT_ISSUES_QUERY_ERROR);
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=agent-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tools.js","sourceRoot":"","sources":["../../src/tools/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,OAAO,EACP,KAAK,EACL,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,mBAAmB,EAAE,qBAAqB;IAC1C,uBAAuB,EAAE,yBAAyB;IAClD,qBAAqB,EAAE,uBAAuB;IAC9C,wBAAwB,EAAE,0BAA0B;CAC5C,CAAC;AAEX;;GAEG;AACH,MAAM,kBAAkB,GAAG;IACzB,WAAW,EAAE,mBAAmB,CAAC,WAAW;IAC5C,aAAa,EAAE,kBAAkB;IACjC,iBAAiB,EAAE,sBAAsB;IACzC,iBAAiB,EAAE,sBAAsB;IACzC,cAAc,EAAE,mBAAmB;IACnC,oBAAoB,EAAE,yBAAyB;CACvC,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAmB;IAC9C,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,kDAAkD;IAC/D,WAAW,EAAE,kBAAkB;IAE/B,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO;QAC1B,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;YACd,OAAO,KAAK,CAAC,kBAAkB,CAAC,WAAW,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC,kBAAkB,CAAC,aAAa,E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oBAAoB;IAC1B,WAAW,EAAE,yDAAyD;IACtE,WAAW,EAAE,sBAAsB;IAEnC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO;QAC1B,MAAM,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QACzB,IAAI,KAAK,CAAC,KAAK;YAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3D,IAAI,KAAK,CAAC,QAAQ;YAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,QAAkB,CAAC,CAAC;QACtE,IAAI,KAAK,CAAC,QAAQ;YAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,QAAkB,CAAC,CAAC;QAEtE,MAAM,UAAU,GAAqB,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;QAC3E,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,oBAAoB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAE3E,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,IAAI,gBAAgB,EAAE,CAAC,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CACV,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,2BAA2B,EACrE,eAAe,CAAC,wBAAwB,CACzC,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file context-tools.ts
|
|
3
|
+
* @description Context/read operations via @lumenflow/core
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
*/
|
|
7
|
+
import { type ToolDefinition } from '../tools-shared.js';
|
|
8
|
+
/**
|
|
9
|
+
* context_get - Get current WU context (location, git state, WU state)
|
|
10
|
+
*/
|
|
11
|
+
export declare const contextGetTool: ToolDefinition;
|
|
12
|
+
/**
|
|
13
|
+
* wu_list - List all WUs with optional status filter
|
|
14
|
+
* Uses CLI shell-out for consistency with other tools
|
|
15
|
+
*
|
|
16
|
+
* WU-1431: Uses shared wuStatusEnum for status filter
|
|
17
|
+
*/
|
|
18
|
+
export declare const wuListTool: ToolDefinition;
|
|
19
|
+
//# sourceMappingURL=context-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-tools.d.ts","sourceRoot":"","sources":["../../src/tools/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAgB5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,cA0CxB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file context-tools.ts
|
|
3
|
+
* @description Context/read operations via @lumenflow/core
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { wuStatusEnum } from '@lumenflow/core';
|
|
9
|
+
import { ErrorCodes, getCore, success, error, runCliCommand, } from '../tools-shared.js';
|
|
10
|
+
/**
|
|
11
|
+
* context_get - Get current WU context (location, git state, WU state)
|
|
12
|
+
*/
|
|
13
|
+
export const contextGetTool = {
|
|
14
|
+
name: 'context_get',
|
|
15
|
+
description: 'Get current LumenFlow context including location, git state, and active WU',
|
|
16
|
+
inputSchema: z.object({}).optional(),
|
|
17
|
+
async execute(_input, options) {
|
|
18
|
+
try {
|
|
19
|
+
const core = await getCore();
|
|
20
|
+
const context = await core.computeWuContext({
|
|
21
|
+
cwd: options?.projectRoot,
|
|
22
|
+
});
|
|
23
|
+
return success(context);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
return error(err instanceof Error ? err.message : String(err), ErrorCodes.CONTEXT_ERROR);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* wu_list - List all WUs with optional status filter
|
|
32
|
+
* Uses CLI shell-out for consistency with other tools
|
|
33
|
+
*
|
|
34
|
+
* WU-1431: Uses shared wuStatusEnum for status filter
|
|
35
|
+
*/
|
|
36
|
+
export const wuListTool = {
|
|
37
|
+
name: 'wu_list',
|
|
38
|
+
description: 'List all Work Units (WUs) with optional status filter',
|
|
39
|
+
// WU-1431: Uses shared wuStatusEnum for status filter
|
|
40
|
+
// (wu_list is MCP-specific, not a shared CLI command, so inline schema is OK)
|
|
41
|
+
inputSchema: z.object({
|
|
42
|
+
status: wuStatusEnum.optional(),
|
|
43
|
+
lane: z.string().optional(),
|
|
44
|
+
}),
|
|
45
|
+
async execute(input, options) {
|
|
46
|
+
// Use spec:linter which validates and lists all WUs
|
|
47
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
48
|
+
// Shell out to get all WU YAMLs via validate --all
|
|
49
|
+
const result = await runCliCommand('wu:validate', ['--all', '--json'], cliOptions);
|
|
50
|
+
if (result.success) {
|
|
51
|
+
try {
|
|
52
|
+
const data = JSON.parse(result.stdout);
|
|
53
|
+
let wus = Array.isArray(data) ? data : data.wus || [];
|
|
54
|
+
// Apply filters
|
|
55
|
+
if (input.status) {
|
|
56
|
+
wus = wus.filter((wu) => wu.status === input.status);
|
|
57
|
+
}
|
|
58
|
+
if (input.lane) {
|
|
59
|
+
wus = wus.filter((wu) => wu.lane === input.lane);
|
|
60
|
+
}
|
|
61
|
+
return success(wus);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
// If JSON parse fails, return raw output
|
|
65
|
+
return success({ message: result.stdout });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return error(result.stderr || result.error?.message || 'wu_list failed', ErrorCodes.WU_LIST_ERROR);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=context-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-tools.js","sourceRoot":"","sources":["../../src/tools/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAEL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,4EAA4E;IACzF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEpC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO;QAC3B,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,OAAO,EAAE,CAAC;YAC7B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC;gBAC1C,GAAG,EAAE,OAAO,EAAE,WAAW;aAC1B,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,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,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CACV,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAC1D,UAAU,CAAC,aAAa,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file flow-tools.ts
|
|
3
|
+
* @description Flow/Metrics tool implementations
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
* WU-1426: Flow/Metrics tools: flow_bottlenecks, flow_report, metrics_snapshot
|
|
7
|
+
* WU-1457: All flow/metrics commands use shared schemas
|
|
8
|
+
*/
|
|
9
|
+
import { type ToolDefinition } from '../tools-shared.js';
|
|
10
|
+
/**
|
|
11
|
+
* flow_bottlenecks - Identify flow bottlenecks
|
|
12
|
+
*/
|
|
13
|
+
export declare const flowBottlenecksTool: ToolDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* flow_report - Generate flow metrics report
|
|
16
|
+
*/
|
|
17
|
+
export declare const flowReportTool: ToolDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* metrics_snapshot - Capture metrics snapshot
|
|
20
|
+
*/
|
|
21
|
+
export declare const metricsSnapshotTool: ToolDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* lumenflow_metrics - Public metrics alias
|
|
24
|
+
*/
|
|
25
|
+
export declare const lumenflowMetricsTool: ToolDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* metrics - Unified workflow metrics command
|
|
28
|
+
*/
|
|
29
|
+
export declare const metricsTool: ToolDefinition;
|
|
30
|
+
//# sourceMappingURL=flow-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-tools.d.ts","sourceRoot":"","sources":["../../src/tools/flow-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EACL,KAAK,cAAc,EAQpB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,cA8BjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAgC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,cA0BjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAkBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,cAkBzB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file flow-tools.ts
|
|
3
|
+
* @description Flow/Metrics tool implementations
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
* WU-1426: Flow/Metrics tools: flow_bottlenecks, flow_report, metrics_snapshot
|
|
7
|
+
* WU-1457: All flow/metrics commands use shared schemas
|
|
8
|
+
*/
|
|
9
|
+
import { flowBottlenecksSchema, flowReportSchema, metricsSnapshotSchema, metricsSchema, } from '@lumenflow/core';
|
|
10
|
+
import { ErrorCodes, CliArgs, success, error, buildMetricsArgs, runCliCommand, } from '../tools-shared.js';
|
|
11
|
+
/**
|
|
12
|
+
* flow_bottlenecks - Identify flow bottlenecks
|
|
13
|
+
*/
|
|
14
|
+
export const flowBottlenecksTool = {
|
|
15
|
+
name: 'flow_bottlenecks',
|
|
16
|
+
description: 'Identify flow bottlenecks in the workflow (WIP violations, stuck WUs, etc.)',
|
|
17
|
+
inputSchema: flowBottlenecksSchema,
|
|
18
|
+
async execute(input, options) {
|
|
19
|
+
const args = [];
|
|
20
|
+
// WU-1457: Use shared schema fields (limit, format match CLI flags)
|
|
21
|
+
if (input.limit)
|
|
22
|
+
args.push('--limit', String(input.limit));
|
|
23
|
+
if (input.format)
|
|
24
|
+
args.push('--format', input.format);
|
|
25
|
+
// WU-1452: flow:bottlenecks uses --format json, not --json
|
|
26
|
+
if (input.json)
|
|
27
|
+
args.push(...CliArgs.FORMAT_JSON);
|
|
28
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
29
|
+
const result = await runCliCommand('flow:bottlenecks', args, cliOptions);
|
|
30
|
+
if (result.success) {
|
|
31
|
+
try {
|
|
32
|
+
const data = JSON.parse(result.stdout);
|
|
33
|
+
return success(data);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return success({ message: result.stdout || 'Bottleneck analysis complete' });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
return error(result.stderr || result.error?.message || 'flow:bottlenecks failed', ErrorCodes.FLOW_BOTTLENECKS_ERROR);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* flow_report - Generate flow metrics report
|
|
46
|
+
*/
|
|
47
|
+
export const flowReportTool = {
|
|
48
|
+
name: 'flow_report',
|
|
49
|
+
description: 'Generate flow metrics report with cycle time, throughput, and other DORA metrics',
|
|
50
|
+
inputSchema: flowReportSchema,
|
|
51
|
+
async execute(input, options) {
|
|
52
|
+
const args = [];
|
|
53
|
+
// WU-1457: Use shared schema field names (start/end match CLI flags)
|
|
54
|
+
if (input.start)
|
|
55
|
+
args.push('--start', input.start);
|
|
56
|
+
if (input.end)
|
|
57
|
+
args.push('--end', input.end);
|
|
58
|
+
if (input.days)
|
|
59
|
+
args.push('--days', String(input.days));
|
|
60
|
+
// WU-1452: flow:report uses --format, not --json
|
|
61
|
+
if (input.format)
|
|
62
|
+
args.push('--format', input.format);
|
|
63
|
+
if (input.json)
|
|
64
|
+
args.push(...CliArgs.FORMAT_JSON);
|
|
65
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
66
|
+
const result = await runCliCommand('flow:report', args, cliOptions);
|
|
67
|
+
if (result.success) {
|
|
68
|
+
try {
|
|
69
|
+
const data = JSON.parse(result.stdout);
|
|
70
|
+
return success(data);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return success({ message: result.stdout || 'Flow report generated' });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return error(result.stderr || result.error?.message || 'flow:report failed', ErrorCodes.FLOW_REPORT_ERROR);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* metrics_snapshot - Capture metrics snapshot
|
|
83
|
+
*/
|
|
84
|
+
export const metricsSnapshotTool = {
|
|
85
|
+
name: 'metrics_snapshot',
|
|
86
|
+
description: 'Capture a snapshot of current LumenFlow metrics',
|
|
87
|
+
inputSchema: metricsSnapshotSchema,
|
|
88
|
+
async execute(_input, options) {
|
|
89
|
+
// WU-1452: metrics:snapshot always outputs JSON (writes to file); no --json flag exists
|
|
90
|
+
const args = [];
|
|
91
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
92
|
+
const result = await runCliCommand('metrics:snapshot', args, cliOptions);
|
|
93
|
+
if (result.success) {
|
|
94
|
+
try {
|
|
95
|
+
const data = JSON.parse(result.stdout);
|
|
96
|
+
return success(data);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return success({ message: result.stdout || 'Metrics snapshot captured' });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return error(result.stderr || result.error?.message || 'metrics:snapshot failed', ErrorCodes.METRICS_SNAPSHOT_ERROR);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* lumenflow_metrics - Public metrics alias
|
|
109
|
+
*/
|
|
110
|
+
export const lumenflowMetricsTool = {
|
|
111
|
+
name: 'lumenflow_metrics',
|
|
112
|
+
description: 'View workflow metrics (lumenflow:metrics alias)',
|
|
113
|
+
inputSchema: metricsSchema,
|
|
114
|
+
async execute(input, options) {
|
|
115
|
+
const args = buildMetricsArgs(input);
|
|
116
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
117
|
+
const result = await runCliCommand('metrics', args, cliOptions);
|
|
118
|
+
if (result.success) {
|
|
119
|
+
return success({ message: result.stdout || 'Metrics generated' });
|
|
120
|
+
}
|
|
121
|
+
return error(result.stderr || result.error?.message || 'lumenflow:metrics failed', ErrorCodes.LUMENFLOW_METRICS_ERROR);
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* metrics - Unified workflow metrics command
|
|
126
|
+
*/
|
|
127
|
+
export const metricsTool = {
|
|
128
|
+
name: 'metrics',
|
|
129
|
+
description: 'View workflow metrics (lanes, dora, flow, all)',
|
|
130
|
+
inputSchema: metricsSchema,
|
|
131
|
+
async execute(input, options) {
|
|
132
|
+
const args = buildMetricsArgs(input);
|
|
133
|
+
const cliOptions = { projectRoot: options?.projectRoot };
|
|
134
|
+
const result = await runCliCommand('metrics', args, cliOptions);
|
|
135
|
+
if (result.success) {
|
|
136
|
+
return success({ message: result.stdout || 'Metrics generated' });
|
|
137
|
+
}
|
|
138
|
+
return error(result.stderr || result.error?.message || 'metrics failed', ErrorCodes.METRICS_ERROR);
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=flow-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-tools.js","sourceRoot":"","sources":["../../src/tools/flow-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,aAAa,GAEd,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAmB;IACjD,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,6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
|
|
3
|
+
* @description Initiative tool implementations
|
|
4
|
+
*
|
|
5
|
+
* WU-1642: Extracted from tools.ts during domain decomposition.
|
|
6
|
+
* WU-1424: Initiative tools
|
|
7
|
+
* WU-1455: Initiative command schemas from @lumenflow/core
|
|
8
|
+
*/
|
|
9
|
+
import { type ToolDefinition } from '../tools-shared.js';
|
|
10
|
+
/**
|
|
11
|
+
* initiative_list - List all initiatives
|
|
12
|
+
*/
|
|
13
|
+
export declare const initiativeListTool: ToolDefinition;
|
|
14
|
+
/**
|
|
15
|
+
* initiative_status - Get status of a specific initiative
|
|
16
|
+
*/
|
|
17
|
+
export declare const initiativeStatusTool: ToolDefinition;
|
|
18
|
+
/**
|
|
19
|
+
* initiative_create - Create a new initiative
|
|
20
|
+
*/
|
|
21
|
+
export declare const initiativeCreateTool: ToolDefinition;
|
|
22
|
+
/**
|
|
23
|
+
* initiative_edit - Edit initiative fields
|
|
24
|
+
*/
|
|
25
|
+
export declare const initiativeEditTool: ToolDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* initiative_add_wu - Add a WU to an initiative
|
|
28
|
+
*/
|
|
29
|
+
export declare const initiativeAddWuTool: ToolDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* initiative_remove_wu - Remove a WU from an initiative
|
|
32
|
+
*/
|
|
33
|
+
export declare const initiativeRemoveWuTool: ToolDefinition;
|
|
34
|
+
/**
|
|
35
|
+
* initiative_bulk_assign - Bulk assign WUs to an initiative
|
|
36
|
+
*/
|
|
37
|
+
export declare const initiatiBulkAssignTool: ToolDefinition;
|
|
38
|
+
/**
|
|
39
|
+
* initiative_plan - Link or create a plan for an initiative
|
|
40
|
+
*/
|
|
41
|
+
export declare const initiativePlanTool: ToolDefinition;
|
|
42
|
+
//# sourceMappingURL=initiative-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initiative-tools.d.ts","sourceRoot":"","sources":["../../src/tools/initiative-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,OAAO,EACL,KAAK,cAAc,EASpB,MAAM,oBAAoB,CAAC;AAwB5B;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cA6BhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAgClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAuClC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAuDhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,cA6BjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,cA4BpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,cA0BpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cA2BhC,CAAC"}
|