@mag.ni/process 1.0.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/LICENSE +21 -0
- package/README.md +122 -0
- package/dist/auth.d.ts +50 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +421 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +208 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +701 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/agents.d.ts +39 -0
- package/dist/tools/agents.d.ts.map +1 -0
- package/dist/tools/agents.js +141 -0
- package/dist/tools/agents.js.map +1 -0
- package/dist/tools/design.d.ts +175 -0
- package/dist/tools/design.d.ts.map +1 -0
- package/dist/tools/design.js +1172 -0
- package/dist/tools/design.js.map +1 -0
- package/dist/tools/index.d.ts +27 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +131 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/session.d.ts +77 -0
- package/dist/tools/session.d.ts.map +1 -0
- package/dist/tools/session.js +285 -0
- package/dist/tools/session.js.map +1 -0
- package/dist/tools/work.d.ts +99 -0
- package/dist/tools/work.d.ts.map +1 -0
- package/dist/tools/work.js +702 -0
- package/dist/tools/work.js.map +1 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Processes - Work Management Tools
|
|
3
|
+
* Tools for managing instances, actions, and diagram context
|
|
4
|
+
*/
|
|
5
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
import { ProcessesApiClient } from "../client.js";
|
|
7
|
+
import { GetMyInstancesParams, GetInstanceDetailsParams, GetAvailableActionsParams, TakeActionParams, GetDiagramContextParams } from "../types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Tool: get_my_instances
|
|
10
|
+
* Get instances assigned to the claimed user
|
|
11
|
+
*/
|
|
12
|
+
export declare const getMyInstancesTool: Tool;
|
|
13
|
+
/**
|
|
14
|
+
* Tool: get_instance_details
|
|
15
|
+
* Get full context for a specific instance
|
|
16
|
+
*/
|
|
17
|
+
export declare const getInstanceDetailsTool: Tool;
|
|
18
|
+
/**
|
|
19
|
+
* Tool: get_available_actions
|
|
20
|
+
* Get actions available at the current step
|
|
21
|
+
*/
|
|
22
|
+
export declare const getAvailableActionsTool: Tool;
|
|
23
|
+
/**
|
|
24
|
+
* Tool: take_action
|
|
25
|
+
* Execute an action on an instance
|
|
26
|
+
*/
|
|
27
|
+
export declare const takeActionTool: Tool;
|
|
28
|
+
/**
|
|
29
|
+
* Tool: get_diagram_context
|
|
30
|
+
* Get the full process flow structure
|
|
31
|
+
*/
|
|
32
|
+
export declare const getDiagramContextTool: Tool;
|
|
33
|
+
/**
|
|
34
|
+
* Tool: get_instance_notes
|
|
35
|
+
* Get all notes for an instance
|
|
36
|
+
*/
|
|
37
|
+
export declare const getInstanceNotesTool: Tool;
|
|
38
|
+
/**
|
|
39
|
+
* Tool: add_instance_note
|
|
40
|
+
* Add a note to an instance
|
|
41
|
+
*/
|
|
42
|
+
export declare const addInstanceNoteTool: Tool;
|
|
43
|
+
/**
|
|
44
|
+
* Tool: get_node_details
|
|
45
|
+
* Get details for specific nodes in a diagram
|
|
46
|
+
*/
|
|
47
|
+
export declare const getNodeDetailsTool: Tool;
|
|
48
|
+
/**
|
|
49
|
+
* Handler for get_my_instances tool
|
|
50
|
+
* Gets instances assigned to the claimed user
|
|
51
|
+
*/
|
|
52
|
+
export declare function handleGetMyInstances(client: ProcessesApiClient, params: GetMyInstancesParams): Promise<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Handler for get_instance_details tool
|
|
55
|
+
* Gets full context for a specific instance including node labels
|
|
56
|
+
*/
|
|
57
|
+
export declare function handleGetInstanceDetails(client: ProcessesApiClient, params: GetInstanceDetailsParams): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Handler for get_available_actions tool
|
|
60
|
+
* Gets actions available at the current step.
|
|
61
|
+
* Detects parallel splits (non-diamond nodes with multiple exits) and merges
|
|
62
|
+
* them into a single action, matching the web interface behavior.
|
|
63
|
+
*/
|
|
64
|
+
export declare function handleGetAvailableActions(client: ProcessesApiClient, params: GetAvailableActionsParams): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Handler for take_action tool
|
|
67
|
+
* Executes an action on an instance
|
|
68
|
+
*/
|
|
69
|
+
export declare function handleTakeAction(client: ProcessesApiClient, params: TakeActionParams): Promise<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Handler for get_diagram_context tool
|
|
72
|
+
* Gets the full process flow structure
|
|
73
|
+
*/
|
|
74
|
+
export declare function handleGetDiagramContext(client: ProcessesApiClient, params: GetDiagramContextParams): Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Handler for get_instance_notes tool
|
|
77
|
+
* Gets all notes for an instance
|
|
78
|
+
*/
|
|
79
|
+
export declare function handleGetInstanceNotes(client: ProcessesApiClient, params: {
|
|
80
|
+
instanceId: string;
|
|
81
|
+
}): Promise<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Handler for add_instance_note tool
|
|
84
|
+
* Adds a note to an instance
|
|
85
|
+
*/
|
|
86
|
+
export declare function handleAddInstanceNote(client: ProcessesApiClient, params: {
|
|
87
|
+
instanceId: string;
|
|
88
|
+
text: string;
|
|
89
|
+
}): Promise<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Handler for get_node_details tool
|
|
92
|
+
* Gets details for specific nodes in a diagram
|
|
93
|
+
*/
|
|
94
|
+
export declare function handleGetNodeDetails(client: ProcessesApiClient, params: {
|
|
95
|
+
diagramId: string;
|
|
96
|
+
nodeIds: string[];
|
|
97
|
+
}): Promise<string>;
|
|
98
|
+
export declare const workTools: Tool[];
|
|
99
|
+
//# sourceMappingURL=work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../../src/tools/work.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAOrB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAchC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,IAapC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,IAarC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,IAsB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,IAanC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,IAalC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,IAiBjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAkBhC,CAAC;AA4BF;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAoCjB;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAiHjB;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,M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