impreza-mcp 0.30.0 → 0.32.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/README.md +590 -549
- package/dist/server.js +300 -0
- package/dist/server.js.map +1 -1
- package/package.json +64 -64
package/dist/server.js
CHANGED
|
@@ -824,6 +824,268 @@ const TOOLS = [
|
|
|
824
824
|
}, required: ['compose_yaml'], additionalProperties: false,
|
|
825
825
|
},
|
|
826
826
|
},
|
|
827
|
+
{
|
|
828
|
+
"name": "impreza_plan_project",
|
|
829
|
+
"description": "Inspect an existing retained source upload and save account-owned build options for up to 24 hours. Reads bounded tar paths and selected configuration files, never executes code or fetches Git. Verifies source SHA256, package-lock/composer.lock presence and PHP public entry presence; does not verify lockfile consistency, dependencies, ignore rules or runtime. At most 20 active plans. Review findings and choose an option before impreza_deploy_project_plan. No capacity reservation; deletion or expiry of the source invalidates the plan. Do not put credentials in start_command.",
|
|
830
|
+
"inputSchema": {
|
|
831
|
+
"type": "object",
|
|
832
|
+
"properties": {
|
|
833
|
+
"context_id": {
|
|
834
|
+
"type": "string",
|
|
835
|
+
"pattern": "^ctx_[a-f0-9]{1,36}$"
|
|
836
|
+
},
|
|
837
|
+
"project_dir": {
|
|
838
|
+
"type": "string",
|
|
839
|
+
"maxLength": 120
|
|
840
|
+
},
|
|
841
|
+
"dockerfile_path": {
|
|
842
|
+
"type": "string",
|
|
843
|
+
"maxLength": 255
|
|
844
|
+
},
|
|
845
|
+
"start_command": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"maxLength": 1000
|
|
848
|
+
},
|
|
849
|
+
"php_document_root": {
|
|
850
|
+
"type": "string",
|
|
851
|
+
"maxLength": 120
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"required": [
|
|
855
|
+
"context_id"
|
|
856
|
+
],
|
|
857
|
+
"additionalProperties": false
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "impreza_list_project_plans",
|
|
862
|
+
"description": "List this account's latest 20 saved upload inspection plans, or retrieve one plan_id. Returns source SHA256, findings, options, expiry and current lifecycle status. No archive contents or private storage paths. Plans are reusable and do not reserve capacity.",
|
|
863
|
+
"inputSchema": {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"properties": {
|
|
866
|
+
"plan_id": {
|
|
867
|
+
"type": "string",
|
|
868
|
+
"pattern": "^plan_[a-f0-9]{24}$",
|
|
869
|
+
"description": "Saved plan ID belonging to this account."
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"required": [],
|
|
873
|
+
"additionalProperties": false
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"name": "impreza_deploy_project_plan",
|
|
878
|
+
"description": "Create a new application from an explicitly reviewed plan option and the selected server/runtime settings. Revalidates plan expiry, inspection rules, source hash, ownership and a recent online target heartbeat. Source and build settings come only from the saved option. Each successful call creates an app; reusable plans are not idempotency keys and do not reserve capacity. Build success is not guaranteed; inspect status/readiness after deployment. Requires deploy scope.",
|
|
879
|
+
"inputSchema": {
|
|
880
|
+
"type": "object",
|
|
881
|
+
"properties": {
|
|
882
|
+
"plan_id": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"pattern": "^plan_[a-f0-9]{24}$",
|
|
885
|
+
"description": "Saved plan ID belonging to this account."
|
|
886
|
+
},
|
|
887
|
+
"option_index": {
|
|
888
|
+
"type": "integer",
|
|
889
|
+
"minimum": 0
|
|
890
|
+
},
|
|
891
|
+
"name": {
|
|
892
|
+
"type": "string",
|
|
893
|
+
"description": "Per-account-unique deploy name (3-100 chars, [a-z0-9_-])."
|
|
894
|
+
},
|
|
895
|
+
"agent_id": {
|
|
896
|
+
"type": "string",
|
|
897
|
+
"description": "Target VPS agent_id (from impreza_list_servers)."
|
|
898
|
+
},
|
|
899
|
+
"domain": {
|
|
900
|
+
"type": "string",
|
|
901
|
+
"description": "Public hostname. Omit when onion:true for onion-only."
|
|
902
|
+
},
|
|
903
|
+
"vars": {
|
|
904
|
+
"type": "object",
|
|
905
|
+
"description": "Environment variables to inject into the container."
|
|
906
|
+
},
|
|
907
|
+
"cpus": {
|
|
908
|
+
"type": "number",
|
|
909
|
+
"description": "CPU limit (cores; 1.0 = one core). Default 1.0."
|
|
910
|
+
},
|
|
911
|
+
"memory_mb": {
|
|
912
|
+
"type": "number",
|
|
913
|
+
"description": "Memory limit in MB. Default 512."
|
|
914
|
+
},
|
|
915
|
+
"target_port": {
|
|
916
|
+
"type": "number",
|
|
917
|
+
"description": "Port the container listens on (default 80)."
|
|
918
|
+
},
|
|
919
|
+
"volumes": {
|
|
920
|
+
"type": "array",
|
|
921
|
+
"items": {
|
|
922
|
+
"type": "string"
|
|
923
|
+
},
|
|
924
|
+
"description": "Absolute container paths to persist as named Docker volumes (data survives redeploys), e.g. [\"/var/lib/app/data\",\"/app/uploads\"]. Ignored for mode=manifest (declare volumes in your compose)."
|
|
925
|
+
},
|
|
926
|
+
"onion": {
|
|
927
|
+
"type": "boolean",
|
|
928
|
+
"description": "Also publish a Tor v3 hidden service. Default false."
|
|
929
|
+
},
|
|
930
|
+
"healthcheck_path": {
|
|
931
|
+
"type": "string",
|
|
932
|
+
"minLength": 1,
|
|
933
|
+
"maxLength": 200,
|
|
934
|
+
"pattern": "^/(?:[A-Za-z0-9_-][A-Za-z0-9._~-]*(?:/[A-Za-z0-9_-][A-Za-z0-9._~-]*)*/?)?$",
|
|
935
|
+
"description": "node_npm, python_pip or php_composer only. Optional HTTP path such as /health (200 ASCII characters max). Checks 127.0.0.1 on target_port and requires 2xx without redirects. Omit for /: Python/PHP require 2xx; legacy Node accepts status below 500. Saved at creation; previews and redeploys retain it. A failed replacement recovers a verified healthy previous release; first installs keep the agent startup warning policy."
|
|
936
|
+
},
|
|
937
|
+
"require_healthy_start": {
|
|
938
|
+
"type": "boolean",
|
|
939
|
+
"description": "node_npm, python_pip or php_composer only. Require an explicit healthcheck_path to become healthy before deployment succeeds, including the first install. Requires agent 0.6.3+. Failed first installs remove containers and preserve volumes; eligible previous releases recover. Omit or false keeps legacy behavior. Saved at creation and inherited by previews/redeploys."
|
|
940
|
+
},
|
|
941
|
+
"startup_timeout_seconds": {
|
|
942
|
+
"type": "integer",
|
|
943
|
+
"minimum": 30,
|
|
944
|
+
"maximum": 600,
|
|
945
|
+
"description": "Required healthy start only: startup observation budget in seconds, default 60. Separate from source/build and recovery time."
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"required": [
|
|
949
|
+
"plan_id",
|
|
950
|
+
"option_index",
|
|
951
|
+
"name",
|
|
952
|
+
"agent_id"
|
|
953
|
+
],
|
|
954
|
+
"additionalProperties": false
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"name": "impreza_prepare_project_deployment",
|
|
959
|
+
"description": "Save an immutable reviewed deployment configuration from a retained-upload plan option. Uses real deployment validation without creating an app, queue job or DNS record. Freezes source/build/server/runtime settings and encrypts environment values; summaries return variable names only. At most 20 pending records, expiring no later than the source plan (24 hours maximum). Review the returned configuration and configuration_digest, then call impreza_apply_project_deployment. Does not reserve domains, ports or capacity. Requires deploy scope and account credentials without resource restrictions.",
|
|
960
|
+
"inputSchema": {
|
|
961
|
+
"type": "object",
|
|
962
|
+
"properties": {
|
|
963
|
+
"plan_id": {
|
|
964
|
+
"type": "string",
|
|
965
|
+
"pattern": "^plan_[a-f0-9]{24}$",
|
|
966
|
+
"description": "Saved plan ID belonging to this account."
|
|
967
|
+
},
|
|
968
|
+
"option_index": {
|
|
969
|
+
"type": "integer",
|
|
970
|
+
"minimum": 0
|
|
971
|
+
},
|
|
972
|
+
"name": {
|
|
973
|
+
"type": "string",
|
|
974
|
+
"description": "Per-account-unique deploy name (3-100 chars, [a-z0-9_-])."
|
|
975
|
+
},
|
|
976
|
+
"agent_id": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"description": "Target VPS agent_id (from impreza_list_servers)."
|
|
979
|
+
},
|
|
980
|
+
"domain": {
|
|
981
|
+
"type": "string",
|
|
982
|
+
"description": "Hostname to use, or omit to propose a managed subdomain. No DNS record is created until apply. Omit with onion=true for onion-only."
|
|
983
|
+
},
|
|
984
|
+
"vars": {
|
|
985
|
+
"type": "object",
|
|
986
|
+
"description": "Runtime environment values, encrypted in the prepared record. Do not use reserved system/routing names. Summaries show names only.",
|
|
987
|
+
"additionalProperties": {
|
|
988
|
+
"type": "string",
|
|
989
|
+
"maxLength": 32768
|
|
990
|
+
},
|
|
991
|
+
"maxProperties": 100
|
|
992
|
+
},
|
|
993
|
+
"cpus": {
|
|
994
|
+
"type": "number",
|
|
995
|
+
"description": "CPU limit (cores; 1.0 = one core). Default 1.0.",
|
|
996
|
+
"exclusiveMinimum": 0,
|
|
997
|
+
"maximum": 64
|
|
998
|
+
},
|
|
999
|
+
"memory_mb": {
|
|
1000
|
+
"type": "integer",
|
|
1001
|
+
"description": "Memory limit in MB. Default 512.",
|
|
1002
|
+
"minimum": 1,
|
|
1003
|
+
"maximum": 524288
|
|
1004
|
+
},
|
|
1005
|
+
"target_port": {
|
|
1006
|
+
"type": "integer",
|
|
1007
|
+
"description": "HTTP port. Omit to use the selected saved option; review the returned effective target_port.",
|
|
1008
|
+
"minimum": 1,
|
|
1009
|
+
"maximum": 65535
|
|
1010
|
+
},
|
|
1011
|
+
"volumes": {
|
|
1012
|
+
"type": "array",
|
|
1013
|
+
"items": {
|
|
1014
|
+
"type": "string"
|
|
1015
|
+
},
|
|
1016
|
+
"description": "Absolute container paths to persist as named Docker volumes (data survives redeploys), e.g. [\"/var/lib/app/data\",\"/app/uploads\"]."
|
|
1017
|
+
},
|
|
1018
|
+
"onion": {
|
|
1019
|
+
"type": "boolean",
|
|
1020
|
+
"description": "Also publish a Tor v3 hidden service. Default false."
|
|
1021
|
+
},
|
|
1022
|
+
"healthcheck_path": {
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"minLength": 1,
|
|
1025
|
+
"maxLength": 200,
|
|
1026
|
+
"pattern": "^/(?:[A-Za-z0-9_-][A-Za-z0-9._~-]*(?:/[A-Za-z0-9_-][A-Za-z0-9._~-]*)*/?)?$",
|
|
1027
|
+
"description": "node_npm, python_pip or php_composer only. Optional HTTP path such as /health (200 ASCII characters max). Checks 127.0.0.1 on target_port and requires 2xx without redirects. Omit for /: Python/PHP require 2xx; legacy Node accepts status below 500. Saved at creation; previews and redeploys retain it. A failed replacement recovers a verified healthy previous release; first installs keep the agent startup warning policy."
|
|
1028
|
+
},
|
|
1029
|
+
"require_healthy_start": {
|
|
1030
|
+
"type": "boolean",
|
|
1031
|
+
"description": "node_npm, python_pip or php_composer only. Require an explicit healthcheck_path to become healthy before deployment succeeds, including the first install. Requires agent 0.6.3+. Failed first installs remove containers and preserve volumes; eligible previous releases recover. Omit or false keeps legacy behavior. Saved at creation and inherited by previews/redeploys."
|
|
1032
|
+
},
|
|
1033
|
+
"startup_timeout_seconds": {
|
|
1034
|
+
"type": "integer",
|
|
1035
|
+
"minimum": 30,
|
|
1036
|
+
"maximum": 600,
|
|
1037
|
+
"description": "Required healthy start only: startup observation budget in seconds, default 60. Separate from source/build and recovery time."
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
"required": [
|
|
1041
|
+
"plan_id",
|
|
1042
|
+
"option_index",
|
|
1043
|
+
"name",
|
|
1044
|
+
"agent_id"
|
|
1045
|
+
],
|
|
1046
|
+
"additionalProperties": false
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "impreza_list_prepared_deployments",
|
|
1051
|
+
"description": "List the latest 20 prepared deployments or retrieve one execution_id. Shows immutable configuration with environment variable names only, confirmation digest, expiry and accepted receipt. Reading never deploys. Accepted receipts remain available after expiry so uncertain requests can be retried safely. Ready status does not certify current source/target availability; apply rechecks it. Requires read scope and account credentials without resource restrictions.",
|
|
1052
|
+
"inputSchema": {
|
|
1053
|
+
"type": "object",
|
|
1054
|
+
"properties": {
|
|
1055
|
+
"execution_id": {
|
|
1056
|
+
"type": "string",
|
|
1057
|
+
"pattern": "^pdep_[a-f0-9]{24}$",
|
|
1058
|
+
"description": "Saved prepared deployment ID belonging to this account."
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
"required": [],
|
|
1062
|
+
"additionalProperties": false
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "impreza_apply_project_deployment",
|
|
1067
|
+
"description": "Apply exactly the saved deployment after the customer reviews its configuration. Send only execution_id and the returned configuration_digest. Revalidates ownership, source integrity, expiry, deployment rules and target. Commits one application, queue job and receipt together. Repeating the same ID/digest returns the original receipt, even after expiry or app removal; it never restarts a failed job or creates another app. Accepted means queued, not healthy: inspect deployment status. No settings overrides; prepare a new record to change configuration. Requires deploy scope and account credentials without resource restrictions.",
|
|
1068
|
+
"inputSchema": {
|
|
1069
|
+
"type": "object",
|
|
1070
|
+
"properties": {
|
|
1071
|
+
"execution_id": {
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"pattern": "^pdep_[a-f0-9]{24}$",
|
|
1074
|
+
"description": "Saved prepared deployment ID belonging to this account."
|
|
1075
|
+
},
|
|
1076
|
+
"configuration_digest": {
|
|
1077
|
+
"type": "string",
|
|
1078
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
1079
|
+
"description": "Digest from the customer-reviewed saved configuration."
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
"required": [
|
|
1083
|
+
"execution_id",
|
|
1084
|
+
"configuration_digest"
|
|
1085
|
+
],
|
|
1086
|
+
"additionalProperties": false
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
827
1089
|
{
|
|
828
1090
|
name: 'impreza_prepare_project',
|
|
829
1091
|
description: 'Analyze supplied package.json, requirements_txt with start_command, composer_json with php_document_root, and/or Dockerfile before deploying. Returns framework hints, available script commands, declared final-stage ports and review findings. Does not fetch Git, execute code or create resources. Send configuration text only, never .env or credentials.',
|
|
@@ -2052,6 +2314,12 @@ const TOOL_ANNOTATIONS = {
|
|
|
2052
2314
|
impreza_list_contexts: A_READ,
|
|
2053
2315
|
impreza_delete_context: A_DESTRUCTIVE,
|
|
2054
2316
|
impreza_prepare_compose: A_READ,
|
|
2317
|
+
impreza_plan_project: A_WRITE,
|
|
2318
|
+
impreza_list_project_plans: A_READ,
|
|
2319
|
+
impreza_deploy_project_plan: A_WRITE_EXT,
|
|
2320
|
+
impreza_prepare_project_deployment: A_WRITE,
|
|
2321
|
+
impreza_list_prepared_deployments: A_READ,
|
|
2322
|
+
impreza_apply_project_deployment: A_WRITE_EXT_IDEM,
|
|
2055
2323
|
impreza_prepare_project: A_READ,
|
|
2056
2324
|
impreza_validate_manifest: A_READ,
|
|
2057
2325
|
impreza_doctor: A_READ,
|
|
@@ -2946,6 +3214,38 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
2946
3214
|
body[field] = args[field];
|
|
2947
3215
|
return toResult(await impreza.post('/v1/platform/deployments/custom/compose/prepare', body));
|
|
2948
3216
|
}
|
|
3217
|
+
case 'impreza_plan_project':
|
|
3218
|
+
return toResult(await impreza.post('/v1/platform/deployments/custom/plans', args));
|
|
3219
|
+
case 'impreza_list_project_plans': {
|
|
3220
|
+
const plan = args.plan_id;
|
|
3221
|
+
if (plan !== undefined && (typeof plan !== 'string' || !/^plan_[a-f0-9]{24}$/.test(plan)))
|
|
3222
|
+
return toError('Invalid plan_id');
|
|
3223
|
+
return toResult(await impreza.get('/v1/platform/deployments/custom/plans' + (plan ? '/' + encodeURIComponent(plan) : '')));
|
|
3224
|
+
}
|
|
3225
|
+
case 'impreza_deploy_project_plan': {
|
|
3226
|
+
if (typeof args.plan_id !== 'string' || !/^plan_[a-f0-9]{24}$/.test(args.plan_id))
|
|
3227
|
+
return toError('Invalid plan_id');
|
|
3228
|
+
const { plan_id, ...body } = args;
|
|
3229
|
+
return toResult(await impreza.post('/v1/platform/deployments/custom/plans/' + encodeURIComponent(plan_id) + '/deploy', body));
|
|
3230
|
+
}
|
|
3231
|
+
case 'impreza_prepare_project_deployment': {
|
|
3232
|
+
if (typeof args.plan_id !== 'string' || !/^plan_[a-f0-9]{24}$/.test(args.plan_id))
|
|
3233
|
+
return toError('Invalid plan_id');
|
|
3234
|
+
const { plan_id, ...body } = args;
|
|
3235
|
+
return toResult(await impreza.post('/v1/platform/deployments/custom/plans/' + encodeURIComponent(plan_id) + '/prepare-deployment', body));
|
|
3236
|
+
}
|
|
3237
|
+
case 'impreza_list_prepared_deployments': {
|
|
3238
|
+
const execution = args.execution_id;
|
|
3239
|
+
if (execution !== undefined && (typeof execution !== 'string' || !/^pdep_[a-f0-9]{24}$/.test(execution)))
|
|
3240
|
+
return toError('Invalid execution_id');
|
|
3241
|
+
return toResult(await impreza.get('/v1/platform/deployments/custom/prepared' + (execution ? '/' + encodeURIComponent(execution) : '')));
|
|
3242
|
+
}
|
|
3243
|
+
case 'impreza_apply_project_deployment': {
|
|
3244
|
+
if (typeof args.execution_id !== 'string' || !/^pdep_[a-f0-9]{24}$/.test(args.execution_id))
|
|
3245
|
+
return toError('Invalid execution_id');
|
|
3246
|
+
const { execution_id, ...body } = args;
|
|
3247
|
+
return toResult(await impreza.post('/v1/platform/deployments/custom/prepared/' + encodeURIComponent(execution_id) + '/apply', body));
|
|
3248
|
+
}
|
|
2949
3249
|
case 'impreza_prepare_project': {
|
|
2950
3250
|
const body = {};
|
|
2951
3251
|
for (const field of ['package_json', 'requirements_txt', 'start_command', 'composer_json', 'php_document_root', 'dockerfile', 'dockerfile_path']) {
|