@solidxai/core 0.1.10-beta.10 → 0.1.10-beta.12
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/.claude/settings.local.json +15 -0
- package/CLAUDE.md +18 -0
- package/CURRENT_PROMPT +6 -0
- package/dist/commands/refresh-model.command.d.ts +1 -7
- package/dist/commands/refresh-model.command.d.ts.map +1 -1
- package/dist/commands/refresh-model.command.js +4 -49
- package/dist/commands/refresh-model.command.js.map +1 -1
- package/dist/commands/refresh-module.command.d.ts +0 -2
- package/dist/commands/refresh-module.command.d.ts.map +1 -1
- package/dist/commands/refresh-module.command.js +3 -16
- package/dist/commands/refresh-module.command.js.map +1 -1
- package/dist/controllers/mcp-audit-log.controller.d.ts +35 -0
- package/dist/controllers/mcp-audit-log.controller.d.ts.map +1 -0
- package/dist/controllers/mcp-audit-log.controller.js +147 -0
- package/dist/controllers/mcp-audit-log.controller.js.map +1 -0
- package/dist/controllers/model-metadata.controller.d.ts +1 -1
- package/dist/controllers/model-metadata.controller.js +2 -2
- package/dist/controllers/model-metadata.controller.js.map +1 -1
- package/dist/controllers/module-metadata.controller.js +1 -1
- package/dist/controllers/module-metadata.controller.js.map +1 -1
- package/dist/dtos/create-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/create-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/create-mcp-audit-log.dto.js +118 -0
- package/dist/dtos/create-mcp-audit-log.dto.js.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts +19 -0
- package/dist/dtos/update-mcp-audit-log.dto.d.ts.map +1 -0
- package/dist/dtos/update-mcp-audit-log.dto.js +117 -0
- package/dist/dtos/update-mcp-audit-log.dto.js.map +1 -0
- package/dist/entities/mcp-audit-log.entity.d.ts +19 -0
- package/dist/entities/mcp-audit-log.entity.d.ts.map +1 -0
- package/dist/entities/mcp-audit-log.entity.js +90 -0
- package/dist/entities/mcp-audit-log.entity.js.map +1 -0
- package/dist/helpers/command.service.d.ts +1 -0
- package/dist/helpers/command.service.d.ts.map +1 -1
- package/dist/helpers/command.service.js +1 -0
- package/dist/helpers/command.service.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +0 -2
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/repository/mcp-audit-log.repository.d.ts +12 -0
- package/dist/repository/mcp-audit-log.repository.d.ts.map +1 -0
- package/dist/repository/mcp-audit-log.repository.js +34 -0
- package/dist/repository/mcp-audit-log.repository.js.map +1 -0
- package/dist/seeders/seed-data/solid-core-metadata.json +346 -0
- package/dist/services/mcp-audit-log.service.d.ts +12 -0
- package/dist/services/mcp-audit-log.service.d.ts.map +1 -0
- package/dist/services/mcp-audit-log.service.js +38 -0
- package/dist/services/mcp-audit-log.service.js.map +1 -0
- package/dist/services/model-metadata.service.d.ts +4 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +21 -11
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts +4 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +19 -2
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +8 -0
- package/dist/solid-core.module.js.map +1 -1
- package/package.json +4 -8
- package/src/commands/refresh-model.command.ts +6 -51
- package/src/commands/refresh-module.command.ts +3 -16
- package/src/controllers/mcp-audit-log.controller.ts +70 -0
- package/src/controllers/model-metadata.controller.ts +1 -1
- package/src/controllers/module-metadata.controller.ts +1 -1
- package/src/dtos/create-mcp-audit-log.dto.ts +84 -0
- package/src/dtos/update-mcp-audit-log.dto.ts +83 -0
- package/src/entities/mcp-audit-log.entity.ts +55 -0
- package/src/helpers/command.service.ts +2 -0
- package/src/index.ts +4 -0
- package/src/interfaces.ts +0 -2
- package/src/repository/mcp-audit-log.repository.ts +17 -0
- package/src/seeders/seed-data/solid-core-metadata.json +346 -0
- package/src/services/1.js +6 -0
- package/src/services/mcp-audit-log.service.ts +19 -0
- package/src/services/model-metadata.service.ts +14 -13
- package/src/services/module-metadata.service.ts +12 -0
- package/src/solid-core.module.ts +8 -0
- package/dist-tests/api/authenticate.spec.js +0 -119
- package/dist-tests/api/authenticate.spec.js.map +0 -1
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
- package/dist-tests/api/ping.spec.js +0 -21
- package/dist-tests/api/ping.spec.js.map +0 -1
- package/dist-tests/helpers/auth.js +0 -41
- package/dist-tests/helpers/auth.js.map +0 -1
- package/dist-tests/helpers/env.js +0 -11
- package/dist-tests/helpers/env.js.map +0 -1
- package/docs/grouping-enhancements.md +0 -89
- package/docs/java-spring/README.md +0 -3
- package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
- package/docs/seed-changes.md +0 -65
- package/docs/test-data-workflow.md +0 -200
- package/docs/type-declaration-import-issue.md +0 -24
|
@@ -5932,6 +5932,214 @@
|
|
|
5932
5932
|
"isSystem": true
|
|
5933
5933
|
}
|
|
5934
5934
|
]
|
|
5935
|
+
},
|
|
5936
|
+
{
|
|
5937
|
+
"singularName": "mcpAuditLog",
|
|
5938
|
+
"pluralName": "mcpAuditLogs",
|
|
5939
|
+
"displayName": "MCP Audit Log",
|
|
5940
|
+
"description": "Audit trail of MCP requests handled by the server",
|
|
5941
|
+
"dataSource": "default",
|
|
5942
|
+
"dataSourceType": "postgres",
|
|
5943
|
+
"tableName": "ss_mcp_audit_log",
|
|
5944
|
+
"isChild": false,
|
|
5945
|
+
"isLegacyTable": true,
|
|
5946
|
+
"isLegacyTableWithId": true,
|
|
5947
|
+
"enableAuditTracking": false,
|
|
5948
|
+
"enableSoftDelete": false,
|
|
5949
|
+
"draftPublishWorkflow": false,
|
|
5950
|
+
"internationalisation": false,
|
|
5951
|
+
"isSystem": true,
|
|
5952
|
+
"userKeyFieldUserKey": "id",
|
|
5953
|
+
"fields": [
|
|
5954
|
+
{
|
|
5955
|
+
"name": "userId",
|
|
5956
|
+
"displayName": "User ID",
|
|
5957
|
+
"type": "int",
|
|
5958
|
+
"columnName": "user_id",
|
|
5959
|
+
"required": false,
|
|
5960
|
+
"unique": false,
|
|
5961
|
+
"index": true,
|
|
5962
|
+
"private": false,
|
|
5963
|
+
"encrypt": false,
|
|
5964
|
+
"isSystem": true
|
|
5965
|
+
},
|
|
5966
|
+
{
|
|
5967
|
+
"name": "apiKeyId",
|
|
5968
|
+
"displayName": "API Key ID",
|
|
5969
|
+
"type": "int",
|
|
5970
|
+
"columnName": "api_key_id",
|
|
5971
|
+
"required": false,
|
|
5972
|
+
"unique": false,
|
|
5973
|
+
"index": false,
|
|
5974
|
+
"private": false,
|
|
5975
|
+
"encrypt": false,
|
|
5976
|
+
"isSystem": true
|
|
5977
|
+
},
|
|
5978
|
+
{
|
|
5979
|
+
"name": "username",
|
|
5980
|
+
"displayName": "Username",
|
|
5981
|
+
"type": "shortText",
|
|
5982
|
+
"columnName": "username",
|
|
5983
|
+
"length": 128,
|
|
5984
|
+
"required": false,
|
|
5985
|
+
"unique": false,
|
|
5986
|
+
"index": false,
|
|
5987
|
+
"private": false,
|
|
5988
|
+
"encrypt": false,
|
|
5989
|
+
"isSystem": true
|
|
5990
|
+
},
|
|
5991
|
+
{
|
|
5992
|
+
"name": "transport",
|
|
5993
|
+
"displayName": "Transport",
|
|
5994
|
+
"type": "shortText",
|
|
5995
|
+
"columnName": "transport",
|
|
5996
|
+
"length": 32,
|
|
5997
|
+
"required": true,
|
|
5998
|
+
"unique": false,
|
|
5999
|
+
"index": false,
|
|
6000
|
+
"private": false,
|
|
6001
|
+
"encrypt": false,
|
|
6002
|
+
"isSystem": true
|
|
6003
|
+
},
|
|
6004
|
+
{
|
|
6005
|
+
"name": "mcpSessionId",
|
|
6006
|
+
"displayName": "MCP Session ID",
|
|
6007
|
+
"type": "shortText",
|
|
6008
|
+
"columnName": "mcp_session_id",
|
|
6009
|
+
"length": 64,
|
|
6010
|
+
"required": false,
|
|
6011
|
+
"unique": false,
|
|
6012
|
+
"index": true,
|
|
6013
|
+
"private": false,
|
|
6014
|
+
"encrypt": false,
|
|
6015
|
+
"isSystem": true
|
|
6016
|
+
},
|
|
6017
|
+
{
|
|
6018
|
+
"name": "clientAddr",
|
|
6019
|
+
"displayName": "Client Address",
|
|
6020
|
+
"type": "shortText",
|
|
6021
|
+
"columnName": "client_addr",
|
|
6022
|
+
"length": 64,
|
|
6023
|
+
"required": false,
|
|
6024
|
+
"unique": false,
|
|
6025
|
+
"index": false,
|
|
6026
|
+
"private": false,
|
|
6027
|
+
"encrypt": false,
|
|
6028
|
+
"isSystem": true
|
|
6029
|
+
},
|
|
6030
|
+
{
|
|
6031
|
+
"name": "method",
|
|
6032
|
+
"displayName": "Method",
|
|
6033
|
+
"type": "shortText",
|
|
6034
|
+
"columnName": "method",
|
|
6035
|
+
"length": 64,
|
|
6036
|
+
"required": true,
|
|
6037
|
+
"unique": false,
|
|
6038
|
+
"index": true,
|
|
6039
|
+
"private": false,
|
|
6040
|
+
"encrypt": false,
|
|
6041
|
+
"isSystem": true
|
|
6042
|
+
},
|
|
6043
|
+
{
|
|
6044
|
+
"name": "requestId",
|
|
6045
|
+
"displayName": "Request ID",
|
|
6046
|
+
"type": "shortText",
|
|
6047
|
+
"columnName": "request_id",
|
|
6048
|
+
"length": 64,
|
|
6049
|
+
"required": false,
|
|
6050
|
+
"unique": false,
|
|
6051
|
+
"index": false,
|
|
6052
|
+
"private": false,
|
|
6053
|
+
"encrypt": false,
|
|
6054
|
+
"isSystem": true
|
|
6055
|
+
},
|
|
6056
|
+
{
|
|
6057
|
+
"name": "toolName",
|
|
6058
|
+
"displayName": "Tool Name",
|
|
6059
|
+
"type": "shortText",
|
|
6060
|
+
"columnName": "tool_name",
|
|
6061
|
+
"length": 128,
|
|
6062
|
+
"required": false,
|
|
6063
|
+
"unique": false,
|
|
6064
|
+
"index": true,
|
|
6065
|
+
"private": false,
|
|
6066
|
+
"encrypt": false,
|
|
6067
|
+
"isSystem": true
|
|
6068
|
+
},
|
|
6069
|
+
{
|
|
6070
|
+
"name": "requestParams",
|
|
6071
|
+
"displayName": "Request Params",
|
|
6072
|
+
"type": "longText",
|
|
6073
|
+
"columnName": "request_params",
|
|
6074
|
+
"required": false,
|
|
6075
|
+
"unique": false,
|
|
6076
|
+
"index": false,
|
|
6077
|
+
"private": false,
|
|
6078
|
+
"encrypt": false,
|
|
6079
|
+
"isSystem": true
|
|
6080
|
+
},
|
|
6081
|
+
{
|
|
6082
|
+
"name": "status",
|
|
6083
|
+
"displayName": "Status",
|
|
6084
|
+
"type": "shortText",
|
|
6085
|
+
"columnName": "status",
|
|
6086
|
+
"length": 16,
|
|
6087
|
+
"required": true,
|
|
6088
|
+
"unique": false,
|
|
6089
|
+
"index": false,
|
|
6090
|
+
"private": false,
|
|
6091
|
+
"encrypt": false,
|
|
6092
|
+
"isSystem": true
|
|
6093
|
+
},
|
|
6094
|
+
{
|
|
6095
|
+
"name": "responseResult",
|
|
6096
|
+
"displayName": "Response Result",
|
|
6097
|
+
"type": "longText",
|
|
6098
|
+
"columnName": "response_result",
|
|
6099
|
+
"required": false,
|
|
6100
|
+
"unique": false,
|
|
6101
|
+
"index": false,
|
|
6102
|
+
"private": false,
|
|
6103
|
+
"encrypt": false,
|
|
6104
|
+
"isSystem": true
|
|
6105
|
+
},
|
|
6106
|
+
{
|
|
6107
|
+
"name": "errorCode",
|
|
6108
|
+
"displayName": "Error Code",
|
|
6109
|
+
"type": "int",
|
|
6110
|
+
"columnName": "error_code",
|
|
6111
|
+
"required": false,
|
|
6112
|
+
"unique": false,
|
|
6113
|
+
"index": false,
|
|
6114
|
+
"private": false,
|
|
6115
|
+
"encrypt": false,
|
|
6116
|
+
"isSystem": true
|
|
6117
|
+
},
|
|
6118
|
+
{
|
|
6119
|
+
"name": "errorMessage",
|
|
6120
|
+
"displayName": "Error Message",
|
|
6121
|
+
"type": "longText",
|
|
6122
|
+
"columnName": "error_message",
|
|
6123
|
+
"required": false,
|
|
6124
|
+
"unique": false,
|
|
6125
|
+
"index": false,
|
|
6126
|
+
"private": false,
|
|
6127
|
+
"encrypt": false,
|
|
6128
|
+
"isSystem": true
|
|
6129
|
+
},
|
|
6130
|
+
{
|
|
6131
|
+
"name": "durationMs",
|
|
6132
|
+
"displayName": "Duration (ms)",
|
|
6133
|
+
"type": "decimal",
|
|
6134
|
+
"columnName": "duration_ms",
|
|
6135
|
+
"required": false,
|
|
6136
|
+
"unique": false,
|
|
6137
|
+
"index": false,
|
|
6138
|
+
"private": false,
|
|
6139
|
+
"encrypt": false,
|
|
6140
|
+
"isSystem": true
|
|
6141
|
+
}
|
|
6142
|
+
]
|
|
5935
6143
|
}
|
|
5936
6144
|
]
|
|
5937
6145
|
},
|
|
@@ -5998,6 +6206,8 @@
|
|
|
5998
6206
|
"AgentSessionController.findOne",
|
|
5999
6207
|
"AgentEventController.findMany",
|
|
6000
6208
|
"AgentEventController.findOne",
|
|
6209
|
+
"McpAuditLogController.findMany",
|
|
6210
|
+
"McpAuditLogController.findOne",
|
|
6001
6211
|
"mcp:invoke",
|
|
6002
6212
|
"agent:invoke"
|
|
6003
6213
|
]
|
|
@@ -6607,6 +6817,32 @@
|
|
|
6607
6817
|
"viewUserKey": "agentEvent-form-view",
|
|
6608
6818
|
"moduleUserKey": "solid-core",
|
|
6609
6819
|
"modelUserKey": "agentEvent"
|
|
6820
|
+
},
|
|
6821
|
+
{
|
|
6822
|
+
"displayName": "MCP Audit Log List Action",
|
|
6823
|
+
"name": "mcpAuditLog-list-action",
|
|
6824
|
+
"type": "solid",
|
|
6825
|
+
"domain": "",
|
|
6826
|
+
"context": "",
|
|
6827
|
+
"customComponent": "",
|
|
6828
|
+
"customIsModal": true,
|
|
6829
|
+
"serverEndpoint": "",
|
|
6830
|
+
"viewUserKey": "mcpAuditLog-list-view",
|
|
6831
|
+
"moduleUserKey": "solid-core",
|
|
6832
|
+
"modelUserKey": "mcpAuditLog"
|
|
6833
|
+
},
|
|
6834
|
+
{
|
|
6835
|
+
"displayName": "MCP Audit Log Form Action",
|
|
6836
|
+
"name": "mcpAuditLog-form-action",
|
|
6837
|
+
"type": "solid",
|
|
6838
|
+
"domain": "",
|
|
6839
|
+
"context": "",
|
|
6840
|
+
"customComponent": "",
|
|
6841
|
+
"customIsModal": true,
|
|
6842
|
+
"serverEndpoint": "",
|
|
6843
|
+
"viewUserKey": "mcpAuditLog-form-view",
|
|
6844
|
+
"moduleUserKey": "solid-core",
|
|
6845
|
+
"modelUserKey": "mcpAuditLog"
|
|
6610
6846
|
}
|
|
6611
6847
|
],
|
|
6612
6848
|
"menus": [
|
|
@@ -6963,6 +7199,14 @@
|
|
|
6963
7199
|
"actionUserKey": "agentEvent-list-action",
|
|
6964
7200
|
"moduleUserKey": "solid-core",
|
|
6965
7201
|
"parentMenuItemUserKey": "agent-menu-item"
|
|
7202
|
+
},
|
|
7203
|
+
{
|
|
7204
|
+
"displayName": "MCP Audit Log",
|
|
7205
|
+
"name": "mcpAuditLog-menu-item",
|
|
7206
|
+
"sequenceNumber": 3,
|
|
7207
|
+
"actionUserKey": "mcpAuditLog-list-action",
|
|
7208
|
+
"moduleUserKey": "solid-core",
|
|
7209
|
+
"parentMenuItemUserKey": "agent-menu-item"
|
|
6966
7210
|
}
|
|
6967
7211
|
],
|
|
6968
7212
|
"views": [
|
|
@@ -13894,6 +14138,108 @@
|
|
|
13894
14138
|
}
|
|
13895
14139
|
]
|
|
13896
14140
|
}
|
|
14141
|
+
},
|
|
14142
|
+
{
|
|
14143
|
+
"name": "mcpAuditLog-list-view",
|
|
14144
|
+
"displayName": "MCP Audit Logs",
|
|
14145
|
+
"type": "list",
|
|
14146
|
+
"context": "{}",
|
|
14147
|
+
"moduleUserKey": "solid-core",
|
|
14148
|
+
"modelUserKey": "mcpAuditLog",
|
|
14149
|
+
"layout": {
|
|
14150
|
+
"type": "list",
|
|
14151
|
+
"attrs": {
|
|
14152
|
+
"pagination": true,
|
|
14153
|
+
"pageSizeOptions": [10, 25, 50],
|
|
14154
|
+
"enableGlobalSearch": true,
|
|
14155
|
+
"create": true,
|
|
14156
|
+
"edit": true,
|
|
14157
|
+
"delete": false
|
|
14158
|
+
},
|
|
14159
|
+
"children": [
|
|
14160
|
+
{ "type": "field", "attrs": { "name": "id" } },
|
|
14161
|
+
{ "type": "field", "attrs": { "name": "createdAt" } },
|
|
14162
|
+
{ "type": "field", "attrs": { "name": "method", "isSearchable": true } },
|
|
14163
|
+
{ "type": "field", "attrs": { "name": "toolName", "isSearchable": true } },
|
|
14164
|
+
{ "type": "field", "attrs": { "name": "status", "isSearchable": true } },
|
|
14165
|
+
{ "type": "field", "attrs": { "name": "username", "isSearchable": true } },
|
|
14166
|
+
{ "type": "field", "attrs": { "name": "userId" } },
|
|
14167
|
+
{ "type": "field", "attrs": { "name": "transport", "isSearchable": true } },
|
|
14168
|
+
{ "type": "field", "attrs": { "name": "mcpSessionId", "isSearchable": true } },
|
|
14169
|
+
{ "type": "field", "attrs": { "name": "clientAddr", "isSearchable": true } },
|
|
14170
|
+
{ "type": "field", "attrs": { "name": "durationMs" } },
|
|
14171
|
+
{ "type": "field", "attrs": { "name": "errorCode" } }
|
|
14172
|
+
]
|
|
14173
|
+
}
|
|
14174
|
+
},
|
|
14175
|
+
{
|
|
14176
|
+
"name": "mcpAuditLog-form-view",
|
|
14177
|
+
"displayName": "MCP Audit Log",
|
|
14178
|
+
"type": "form",
|
|
14179
|
+
"context": "{}",
|
|
14180
|
+
"moduleUserKey": "solid-core",
|
|
14181
|
+
"modelUserKey": "mcpAuditLog",
|
|
14182
|
+
"layout": {
|
|
14183
|
+
"type": "form",
|
|
14184
|
+
"attrs": {
|
|
14185
|
+
"name": "form-1",
|
|
14186
|
+
"label": "MCP Audit Log",
|
|
14187
|
+
"className": "grid"
|
|
14188
|
+
},
|
|
14189
|
+
"children": [
|
|
14190
|
+
{
|
|
14191
|
+
"type": "sheet",
|
|
14192
|
+
"attrs": { "name": "sheet-1" },
|
|
14193
|
+
"children": [
|
|
14194
|
+
{
|
|
14195
|
+
"type": "row",
|
|
14196
|
+
"attrs": { "name": "row-1" },
|
|
14197
|
+
"children": [
|
|
14198
|
+
{
|
|
14199
|
+
"type": "column",
|
|
14200
|
+
"attrs": { "name": "col-1", "label": "", "className": "col-12 sm:col-12 md:col-6 lg:col-6" },
|
|
14201
|
+
"children": [
|
|
14202
|
+
{ "type": "field", "attrs": { "name": "method" } },
|
|
14203
|
+
{ "type": "field", "attrs": { "name": "toolName" } },
|
|
14204
|
+
{ "type": "field", "attrs": { "name": "status" } },
|
|
14205
|
+
{ "type": "field", "attrs": { "name": "transport" } },
|
|
14206
|
+
{ "type": "field", "attrs": { "name": "mcpSessionId" } },
|
|
14207
|
+
{ "type": "field", "attrs": { "name": "requestId" } }
|
|
14208
|
+
]
|
|
14209
|
+
},
|
|
14210
|
+
{
|
|
14211
|
+
"type": "column",
|
|
14212
|
+
"attrs": { "name": "col-2", "label": "", "className": "col-12 sm:col-12 md:col-6 lg:col-6" },
|
|
14213
|
+
"children": [
|
|
14214
|
+
{ "type": "field", "attrs": { "name": "userId" } },
|
|
14215
|
+
{ "type": "field", "attrs": { "name": "apiKeyId" } },
|
|
14216
|
+
{ "type": "field", "attrs": { "name": "username" } },
|
|
14217
|
+
{ "type": "field", "attrs": { "name": "clientAddr" } },
|
|
14218
|
+
{ "type": "field", "attrs": { "name": "durationMs" } },
|
|
14219
|
+
{ "type": "field", "attrs": { "name": "errorCode" } }
|
|
14220
|
+
]
|
|
14221
|
+
}
|
|
14222
|
+
]
|
|
14223
|
+
},
|
|
14224
|
+
{
|
|
14225
|
+
"type": "row",
|
|
14226
|
+
"attrs": { "name": "row-2" },
|
|
14227
|
+
"children": [
|
|
14228
|
+
{
|
|
14229
|
+
"type": "column",
|
|
14230
|
+
"attrs": { "name": "col-payload", "label": "", "className": "col-12" },
|
|
14231
|
+
"children": [
|
|
14232
|
+
{ "type": "field", "attrs": { "name": "requestParams", "viewWidget": "SolidJsonFormViewWidget" } },
|
|
14233
|
+
{ "type": "field", "attrs": { "name": "responseResult", "viewWidget": "SolidJsonFormViewWidget" } },
|
|
14234
|
+
{ "type": "field", "attrs": { "name": "errorMessage" } }
|
|
14235
|
+
]
|
|
14236
|
+
}
|
|
14237
|
+
]
|
|
14238
|
+
}
|
|
14239
|
+
]
|
|
14240
|
+
}
|
|
14241
|
+
]
|
|
14242
|
+
}
|
|
13897
14243
|
}
|
|
13898
14244
|
],
|
|
13899
14245
|
"emailTemplates": [
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
1. Do i need to create a storeStreams method for aws service too?
|
|
2
|
+
- Handle later
|
|
3
|
+
2. queues handling -> if queues is enabled by default, i.e triggerExport(exportTransactionEntity.id).
|
|
4
|
+
- startExport should either return the data or return the transaction id
|
|
5
|
+
3. How to handle scenarios wherein, nested related exist.(do i need to only get the userkey)
|
|
6
|
+
- show the userKey
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Injectable } from '@nestjs/common';
|
|
2
|
+
import { ModuleRef } from '@nestjs/core';
|
|
3
|
+
import { InjectEntityManager } from '@nestjs/typeorm';
|
|
4
|
+
import { McpAuditLog } from 'src/entities/mcp-audit-log.entity';
|
|
5
|
+
import { McpAuditLogRepository } from 'src/repository/mcp-audit-log.repository';
|
|
6
|
+
import { EntityManager } from 'typeorm';
|
|
7
|
+
import { CRUDService } from './crud.service';
|
|
8
|
+
|
|
9
|
+
@Injectable()
|
|
10
|
+
export class McpAuditLogService extends CRUDService<McpAuditLog> {
|
|
11
|
+
constructor(
|
|
12
|
+
@InjectEntityManager()
|
|
13
|
+
readonly entityManager: EntityManager,
|
|
14
|
+
readonly repo: McpAuditLogRepository,
|
|
15
|
+
readonly moduleRef: ModuleRef,
|
|
16
|
+
) {
|
|
17
|
+
super(entityManager, repo, 'mcpAuditLog', 'solid-core', moduleRef);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
REMOVE_FIELDS_COMMAND,
|
|
28
28
|
SchematicService
|
|
29
29
|
} from '../helpers/schematic.service';
|
|
30
|
+
import { CommandService } from '../helpers/command.service';
|
|
30
31
|
import { CodeGenerationOptions } from '../interfaces';
|
|
31
32
|
import { CrudHelperService } from './crud-helper.service';
|
|
32
33
|
import { FieldMetadataService } from './field-metadata.service';
|
|
@@ -49,6 +50,7 @@ export class ModelMetadataService {
|
|
|
49
50
|
private readonly modelMetadataRepo: ModelMetadataRepository,
|
|
50
51
|
private readonly fieldMetadataRepo: FieldMetadataRepository,
|
|
51
52
|
private readonly schematicService: SchematicService,
|
|
53
|
+
private readonly commandService: CommandService,
|
|
52
54
|
@InjectDataSource()
|
|
53
55
|
private readonly dataSource: DataSource,
|
|
54
56
|
private readonly crudHelperService: CrudHelperService,
|
|
@@ -735,6 +737,16 @@ export class ModelMetadataService {
|
|
|
735
737
|
|
|
736
738
|
}
|
|
737
739
|
|
|
740
|
+
@DisallowInProduction()
|
|
741
|
+
async generateCodeViaCtl(modelId: number): Promise<string> {
|
|
742
|
+
const model = await this.findOne(modelId);
|
|
743
|
+
return this.commandService.executeCommandWithArgs({
|
|
744
|
+
command: 'npx',
|
|
745
|
+
args: ['@solixai/solidctl@latest', 'generate', 'model', `--name=${model.singularName}`],
|
|
746
|
+
cwd: path.join(process.cwd(), '..'),
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
|
|
738
750
|
@DisallowInProduction()
|
|
739
751
|
async handleGenerateCode(options: CodeGenerationOptions): Promise<any> {
|
|
740
752
|
const affectedModelIds = [], refreshModelCodeOutputLines = [], removeFieldCodeOutputLines = [];
|
|
@@ -1275,24 +1287,13 @@ export class ModelMetadataService {
|
|
|
1275
1287
|
};
|
|
1276
1288
|
const model = options.modelId ? await this.findOne(options.modelId, query) : await this.findOneByUserKey(options.modelUserKey, query.populate);
|
|
1277
1289
|
|
|
1278
|
-
let fieldsForRefresh = model.fields.filter((field) => !field.isMarkedForRemoval);
|
|
1279
|
-
|
|
1280
|
-
// If a list of field ids or field names is passed for refresh, use these fields only
|
|
1281
|
-
if (options.fieldIdsForRefresh && options.fieldIdsForRefresh.length > 0) {
|
|
1282
|
-
fieldsForRefresh = fieldsForRefresh.filter((field) => options.fieldIdsForRefresh.includes(+field.id));
|
|
1283
|
-
} else if (options.fieldNamesForRefresh && options.fieldNamesForRefresh.length > 0) {
|
|
1284
|
-
fieldsForRefresh = fieldsForRefresh.filter((field) => options.fieldNamesForRefresh.includes(field.name));
|
|
1285
|
-
}
|
|
1286
|
-
// const fieldsForRefresh = model.fields.filter((field) => !field.isMarkedForRemoval);
|
|
1287
|
-
|
|
1288
1290
|
//Execute the schematic command to refresh the model
|
|
1289
|
-
const refreshOuput = await this.executeRefreshModelCommand(model,
|
|
1291
|
+
const refreshOuput = await this.executeRefreshModelCommand(model, options.dryRun);
|
|
1290
1292
|
|
|
1291
1293
|
return `${refreshOuput}`;
|
|
1292
1294
|
}
|
|
1293
1295
|
|
|
1294
|
-
private async executeRefreshModelCommand(model: ModelMetadata,
|
|
1295
|
-
// const fieldsForRefresh = model.fields.filter((field) => !field.isMarkedForRemoval);
|
|
1296
|
+
private async executeRefreshModelCommand(model: ModelMetadata, dryRun: boolean = false): Promise<string> {
|
|
1296
1297
|
const output = await this.schematicService.executeSchematicCommand(
|
|
1297
1298
|
REFRESH_MODEL_COMMAND,
|
|
1298
1299
|
{
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
ADD_MODULE_COMMAND,
|
|
23
23
|
SchematicService,
|
|
24
24
|
} from '../helpers/schematic.service';
|
|
25
|
+
import { CommandService } from '../helpers/command.service';
|
|
25
26
|
import { SolidRegistry } from '../helpers/solid-registry';
|
|
26
27
|
import { CodeGenerationOptions, ModuleMetadataConfiguration } from '../interfaces';
|
|
27
28
|
import { CrudHelperService } from './crud-helper.service';
|
|
@@ -40,6 +41,7 @@ export class ModuleMetadataService {
|
|
|
40
41
|
private readonly moduleMetadataRepo: ModuleMetadataRepository,
|
|
41
42
|
private readonly crudHelperService: CrudHelperService,
|
|
42
43
|
private readonly schematicService: SchematicService,
|
|
44
|
+
private readonly commandService: CommandService,
|
|
43
45
|
private readonly fileService: DiskFileService,
|
|
44
46
|
private readonly settingService: SettingService,
|
|
45
47
|
|
|
@@ -403,6 +405,16 @@ export class ModuleMetadataService {
|
|
|
403
405
|
return true
|
|
404
406
|
}
|
|
405
407
|
|
|
408
|
+
@DisallowInProduction()
|
|
409
|
+
async generateCodeViaCtl(moduleId: number): Promise<string> {
|
|
410
|
+
const module = await this.findOne(moduleId);
|
|
411
|
+
return this.commandService.executeCommandWithArgs({
|
|
412
|
+
command: 'npx',
|
|
413
|
+
args: ['@solixai/solidctl@latest', 'generate', 'module', `--name=${module.name}`],
|
|
414
|
+
cwd: path.join(process.cwd(), '..'),
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
|
|
406
418
|
@DisallowInProduction()
|
|
407
419
|
async generateCode(options: CodeGenerationOptions): Promise<string> {
|
|
408
420
|
if (!options.moduleId && !options.moduleUserKey) {
|
package/src/solid-core.module.ts
CHANGED
|
@@ -191,6 +191,7 @@ import { SavedFiltersController } from './controllers/saved-filters.controller';
|
|
|
191
191
|
import { ScheduledJobController } from './controllers/scheduled-job.controller';
|
|
192
192
|
import { AgentSessionController } from './controllers/agent-session.controller';
|
|
193
193
|
import { AgentEventController } from './controllers/agent-event.controller';
|
|
194
|
+
import { McpAuditLogController } from './controllers/mcp-audit-log.controller';
|
|
194
195
|
import { SecurityRuleController } from './controllers/security-rule.controller';
|
|
195
196
|
import { SettingController } from './controllers/setting.controller';
|
|
196
197
|
import { InfoController } from './controllers/info.controller';
|
|
@@ -217,6 +218,7 @@ import { SavedFilters } from './entities/saved-filters.entity';
|
|
|
217
218
|
import { ScheduledJob } from './entities/scheduled-job.entity';
|
|
218
219
|
import { AgentSession } from './entities/agent-session.entity';
|
|
219
220
|
import { AgentEvent } from './entities/agent-event.entity';
|
|
221
|
+
import { McpAuditLog } from './entities/mcp-audit-log.entity';
|
|
220
222
|
import { SecurityRule } from './entities/security-rule.entity';
|
|
221
223
|
import { Setting } from './entities/setting.entity';
|
|
222
224
|
import { UserActivityHistory } from './entities/user-activity-history.entity';
|
|
@@ -295,6 +297,7 @@ import { SavedFiltersRepository } from './repository/saved-filters.repository';
|
|
|
295
297
|
import { ScheduledJobRepository } from './repository/scheduled-job.repository';
|
|
296
298
|
import { AgentSessionRepository } from './repository/agent-session.repository';
|
|
297
299
|
import { AgentEventRepository } from './repository/agent-event.repository';
|
|
300
|
+
import { McpAuditLogRepository } from './repository/mcp-audit-log.repository';
|
|
298
301
|
import { SecurityRuleRepository } from './repository/security-rule.repository';
|
|
299
302
|
import { SettingRepository } from './repository/setting.repository';
|
|
300
303
|
import { SmsTemplateRepository } from './repository/sms-template.repository';
|
|
@@ -344,6 +347,7 @@ import { SavedFiltersService } from './services/saved-filters.service';
|
|
|
344
347
|
import { ScheduledJobService } from './services/scheduled-job.service';
|
|
345
348
|
import { AgentSessionService } from './services/agent-session.service';
|
|
346
349
|
import { AgentEventService } from './services/agent-event.service';
|
|
350
|
+
import { McpAuditLogService } from './services/mcp-audit-log.service';
|
|
347
351
|
import { SchedulerServiceImpl } from './services/scheduled-jobs/scheduler.service';
|
|
348
352
|
import { SecurityRuleService } from './services/security-rule.service';
|
|
349
353
|
import { ListOfDashboardQuestionProvidersSelectionProvider } from './services/selection-providers/list-of-dashboard-question-providers-selection-provider.service';
|
|
@@ -427,6 +431,7 @@ import { Entity } from 'typeorm';
|
|
|
427
431
|
ScheduledJob,
|
|
428
432
|
AgentSession,
|
|
429
433
|
AgentEvent,
|
|
434
|
+
McpAuditLog,
|
|
430
435
|
SecurityRule,
|
|
431
436
|
Setting,
|
|
432
437
|
SmsTemplate,
|
|
@@ -505,6 +510,7 @@ import { Entity } from 'typeorm';
|
|
|
505
510
|
ScheduledJobController,
|
|
506
511
|
AgentSessionController,
|
|
507
512
|
AgentEventController,
|
|
513
|
+
McpAuditLogController,
|
|
508
514
|
SecurityRuleController,
|
|
509
515
|
ServiceController,
|
|
510
516
|
SettingController,
|
|
@@ -774,8 +780,10 @@ import { Entity } from 'typeorm';
|
|
|
774
780
|
ScheduledJobRepository,
|
|
775
781
|
AgentSessionRepository,
|
|
776
782
|
AgentEventRepository,
|
|
783
|
+
McpAuditLogRepository,
|
|
777
784
|
AgentSessionService,
|
|
778
785
|
AgentEventService,
|
|
786
|
+
McpAuditLogService,
|
|
779
787
|
ScheduledJobSubscriber,
|
|
780
788
|
AlphaNumExternalIdComputationProvider,
|
|
781
789
|
ListOfValuesSubscriber,
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const test_1 = require("@playwright/test");
|
|
4
|
-
const env_1 = require("../helpers/env");
|
|
5
|
-
const baseURL = process.env.API_BASE_URL ?? "http://localhost:3000";
|
|
6
|
-
const TEST_USER_EMAIL = (0, env_1.getRequiredEnv)("TEST_USER_EMAIL");
|
|
7
|
-
const TEST_USER_PASSWORD = (0, env_1.getRequiredEnv)("TEST_USER_PASSWORD");
|
|
8
|
-
function base64UrlDecode(input) {
|
|
9
|
-
const normalized = input.replace(/-/g, "+").replace(/_/g, "/");
|
|
10
|
-
const padded = normalized.length % 4 === 0
|
|
11
|
-
? normalized
|
|
12
|
-
: normalized.padEnd(normalized.length + (4 - (normalized.length % 4)), "=");
|
|
13
|
-
return Buffer.from(padded, "base64").toString("utf-8");
|
|
14
|
-
}
|
|
15
|
-
function validateJwt(token) {
|
|
16
|
-
const parts = token.split(".");
|
|
17
|
-
if (parts.length !== 3) {
|
|
18
|
-
throw new Error("JWT must have three dot-separated parts.");
|
|
19
|
-
}
|
|
20
|
-
const headerJson = JSON.parse(base64UrlDecode(parts[0]));
|
|
21
|
-
const payloadJson = JSON.parse(base64UrlDecode(parts[1]));
|
|
22
|
-
if (!headerJson || typeof headerJson !== "object") {
|
|
23
|
-
throw new Error("JWT header must be a JSON object.");
|
|
24
|
-
}
|
|
25
|
-
if (!payloadJson || typeof payloadJson !== "object") {
|
|
26
|
-
throw new Error("JWT payload must be a JSON object.");
|
|
27
|
-
}
|
|
28
|
-
if (typeof payloadJson.exp !== "number") {
|
|
29
|
-
throw new Error("JWT payload.exp must be a number.");
|
|
30
|
-
}
|
|
31
|
-
return payloadJson;
|
|
32
|
-
}
|
|
33
|
-
(0, test_1.test)("API: authenticate succeeds with valid credentials", async () => {
|
|
34
|
-
const api = await test_1.request.newContext({
|
|
35
|
-
baseURL,
|
|
36
|
-
extraHTTPHeaders: {
|
|
37
|
-
accept: "*/*",
|
|
38
|
-
"content-type": "application/json",
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
try {
|
|
42
|
-
const res = await api.post("/api/iam/authenticate", {
|
|
43
|
-
data: {
|
|
44
|
-
email: TEST_USER_EMAIL,
|
|
45
|
-
username: "",
|
|
46
|
-
password: TEST_USER_PASSWORD,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
(0, test_1.expect)(res.status()).toBe(200);
|
|
50
|
-
const json = await res.json();
|
|
51
|
-
(0, test_1.expect)(json.statusCode).toBe(200);
|
|
52
|
-
(0, test_1.expect)(Array.isArray(json.message)).toBe(true);
|
|
53
|
-
(0, test_1.expect)(json.message.length).toBe(0);
|
|
54
|
-
(0, test_1.expect)(json.error).toBe("");
|
|
55
|
-
const user = json.data?.user;
|
|
56
|
-
(0, test_1.expect)(user, "Expected data.user to be an object.").toBeTruthy();
|
|
57
|
-
(0, test_1.expect)(typeof user).toBe("object");
|
|
58
|
-
const email = user?.email;
|
|
59
|
-
(0, test_1.expect)(typeof email).toBe("string");
|
|
60
|
-
if (email === TEST_USER_EMAIL) {
|
|
61
|
-
(0, test_1.expect)(email).toBe(TEST_USER_EMAIL);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
(0, test_1.expect)(email.length).toBeGreaterThan(0);
|
|
65
|
-
}
|
|
66
|
-
(0, test_1.expect)(typeof user?.mobile).toBe("string");
|
|
67
|
-
(0, test_1.expect)(typeof user?.username).toBe("string");
|
|
68
|
-
(0, test_1.expect)(typeof user?.forcePasswordChange).toBe("boolean");
|
|
69
|
-
(0, test_1.expect)(typeof user?.id).toBe("number");
|
|
70
|
-
const roles = user?.roles;
|
|
71
|
-
(0, test_1.expect)(Array.isArray(roles)).toBe(true);
|
|
72
|
-
if (Array.isArray(roles)) {
|
|
73
|
-
(0, test_1.expect)(roles.every((role) => typeof role === "string")).toBe(true);
|
|
74
|
-
(0, test_1.expect)(roles).toContain("Admin");
|
|
75
|
-
}
|
|
76
|
-
const accessToken = json.data?.accessToken;
|
|
77
|
-
const refreshToken = json.data?.refreshToken;
|
|
78
|
-
(0, test_1.expect)(typeof accessToken).toBe("string");
|
|
79
|
-
(0, test_1.expect)(typeof refreshToken).toBe("string");
|
|
80
|
-
const accessPayload = validateJwt(accessToken);
|
|
81
|
-
const refreshPayload = validateJwt(refreshToken);
|
|
82
|
-
(0, test_1.expect)(typeof accessPayload.exp).toBe("number");
|
|
83
|
-
(0, test_1.expect)(typeof refreshPayload.exp).toBe("number");
|
|
84
|
-
}
|
|
85
|
-
finally {
|
|
86
|
-
await api.dispose();
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
(0, test_1.test)("API: authenticate fails with wrong password", async () => {
|
|
90
|
-
const api = await test_1.request.newContext({
|
|
91
|
-
baseURL,
|
|
92
|
-
extraHTTPHeaders: {
|
|
93
|
-
accept: "*/*",
|
|
94
|
-
"content-type": "application/json",
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
try {
|
|
98
|
-
const res = await api.post("/api/iam/authenticate", {
|
|
99
|
-
data: {
|
|
100
|
-
email: TEST_USER_EMAIL,
|
|
101
|
-
username: "",
|
|
102
|
-
password: `${TEST_USER_PASSWORD}__wrong`,
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
(0, test_1.expect)(res.status()).toBe(401);
|
|
106
|
-
const json = await res.json();
|
|
107
|
-
(0, test_1.expect)(json.statusCode).toBe(401);
|
|
108
|
-
(0, test_1.expect)(json.statusCodeMessage).toBe("Unauthorized");
|
|
109
|
-
(0, test_1.expect)(json.message).toBe("Invalid credentials");
|
|
110
|
-
(0, test_1.expect)(json.error).toBe("Invalid credentials");
|
|
111
|
-
(0, test_1.expect)(json.data?.statusCode).toBe(401);
|
|
112
|
-
(0, test_1.expect)(json.data?.error).toBe("Unauthorized");
|
|
113
|
-
(0, test_1.expect)(json.data?.message).toBe("Invalid credentials");
|
|
114
|
-
}
|
|
115
|
-
finally {
|
|
116
|
-
await api.dispose();
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
//# sourceMappingURL=authenticate.spec.js.map
|